Repository navigation
fix(jobs): route queued agents to combined serve jobs API - #1207
Merged
SamSaffron merged 2 commits intoOct 6, 2026
Merged
Conversation
Owner
|
I am reworking a lot of this, I just merged a much smarter and more complete spawn agent, this will mean that usage of queue agent will be quite rare. happy to merge this in the interim but we have a merge conflict. |
Owner
|
actually looks like it is easy enough to merge ... |
Owner
|
Integrated into main with the duplicate childRuns field fixed; build, tests, vet, and complexity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
queue_agentandwait_for_jobsbuilt their jobs URL fromTERM_LLM_JOBS_SERVER(defaulthttp://127.0.0.1:8080) and stripped any trailing/uior/chat. A combinedserve web jobsprocess mounts the jobs API under its base path and redirects the root to the UI, so queuing from a web chat failed (POST /v2/jobs→ 307 → HTTP 405). The only workaround was a separate root-mountedserve jobsprocess. With that, completion notices can't reach the live web session: they're only appended to the session store, sonotify_when_donenever steers a running turn or starts an idle one.A serve process that runs jobs now binds the queued-job tools it creates to its own address, mounted base path and bearer token, so combined
serve web jobsneeds no jobs environment variables and keeps notifications in-process. Outside a combined server,TERM_LLM_JOBS_SERVERis now used exactly as given, so an explicit/uior custom base path works as the job-runner guide describes. The guide documents both cases.Testing
/uiand/chatbase paths forqueue_agentandwait_for_jobs;make build,go test ./...,go vet ./...,go mod tidy -diff(all modules),make complexity, and CI's web lifecycle race targets.serve web jobs --approval prompt:notify_when_donereaches the model, which quotes a marker only present in the job output without callingwait_for_jobs;TERM_LLM_JOBS_SERVER: it still works with a separate jobs server, and with a combined server at/ui.Notes
/ui//chattrimming means aTERM_LLM_JOBS_SERVERthat points at a standaloneserve jobsbut includes/uiwill now 404. That's intentional: the URL is treated as the exact API base. Happy to keep a fallback if you'd rather.claude-bin, a mid-turn notice is delivered through the existing native-interrupt steering path, so it cancels the tool call in progress. A self-hosted/OpenAI-compatible provider handled the same notice between tool calls. Deferring notices until the current tool call finishes would be a separate change.