Repository navigation
fix(opencode): report each tool call when it starts, not only when it finishes - #266
Merged
Merged
Conversation
… finishes opencode run --format json prints a tool part only once it finished, so a 32-minute test battery read as 32 minutes of model silence (magnetar-rust-20261018b) and agent-runtime could not bound a silent model call on this backend. The turn's plugin now also prints each root-session tool part when it enters running; the finished part then carries only the outcome.
tangletools
approved these changes
Oct 20, 2026
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 6307d5c9
Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-20T00:07:23Z
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.
Problem.
opencode run --format jsonprints a tool part only once it finished. magnetar-rust-20261018b's 32-minute prove battery read as 32.4 minutes of model silence, and agent-runtime could not bound a silent model call on this backend.Change. The turn's plugin (
cli-bridge-signals.js, which already carried the retry signal) also prints each tool part when it entersrunning, filtered to the run's own session so a subagent's tool never opens an unclosed call. The finished part then carries only the outcome; a call the plugin missed is still reported whole.Proof.
tests/opencode-tool-start-real.test.tsagainst real opencode 1.18.33 on GTR: 1/1 passed (a scriptedbashcall sleeping 4 s reaches the stream while it runs, outcome after, one call per id). Beelinks have no opencode, so the Beelink gate covers typecheck and the rest of the suite.Recommitted after the 10-19 23:39Z GTR crash zeroed the original commit object; tree 040bfdce is identical.
Run ID: run_d6079f71c26d6744c680649a608ec438