Repository navigation
feat(core): add opencode job_list, job_output, job_wait, and job_stop tools - #60497
Open
kitlangton wants to merge 1 commit into
Open
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
kitlangton
force-pushed
the
t902-tool-seam
branch
from
October 30, 2026 06:38
25840d0 to
0ac00be
Compare
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 06:38
94a61e6 to
0a464d8
Compare
kitlangton
force-pushed
the
t902-tool-seam
branch
from
October 30, 2026 13:56
0ac00be to
5ecadd0
Compare
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 13:58
0a464d8 to
4db06c2
Compare
kitlangton
force-pushed
the
t902-tool-seam
branch
from
October 30, 2026 14:52
5ecadd0 to
f141fff
Compare
kitlangton
force-pushed
the
t902-job-tools
branch
from
October 30, 2026 14:53
4db06c2 to
8ee2473
Compare
1 task done
This branch has not been deployed
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.
Agents can now list, read live output from, wait on, and stop background jobs through
tools.opencode.job_*without polling withsleep.The four tools live in the
opencodeCode Mode catalog (codemode: true, pinned: true) so they stay out of the direct top-level tool list unless Code Mode is disabled. Stacked on #60495.🔍 Origin: reported in #36423, #36424, and #56940
💡 Why: Once a build, server, Code Mode script, or subagent moved to the background, an agent had no way to inspect its live progress, wait boundedly when blocked on its output, or stop a stuck process (#36423, #36424, #56940) — and in a 120-run small-model eval across Haiku 5.5, DeepSeek V4.1 Flash, MiniMax M3, and Gemini 3.5 Flash Lite, putting
job_*directly into top-level tool definitions caused smaller models to calljob_output/job_waitwith made-up IDs, whereas keeping them intools.opencode.*produced0misfires (15/15pass).🆕 Now you can: Call
tools.opencode.job_list,job_output,job_wait, andjob_stopinside Code Mode (or asopencode_job_*when Code Mode is disabled), scoped strictly to jobs owned by the calling session.📊 Proof
job_stopcancels the job and any descendant subagent jobssleep && catjob_output/job_waitread live snapshots directlyexecutecallNew integration tests in
packages/core/test/tool-job.test.tsfail without the change; 2 suites (17 assertions) pass.👀 Read:
packages/core/src/tool/plugin/job.tsinrequireOwnedandstopDescendantSessions—requireOwnedrejects both foreign-session jobs and the activeexecutecall's owncallIDso a script never lists or cancels itself. The rest is routine.Checks run
bun run script/test.ts test/tool-job.test.ts(packages/core): 2 pass, 0 failbun run typecheck && bun run typecheck:tsc(packages/core): 0 errors