Skip to content

fix(opencode): report each tool call when it starts, not only when it finishes - #266

Merged
drewstone merged 1 commit into
mainfrom
feat/opencode-tool-starts-20261019
Oct 20, 2026
Merged

drewstone merged 1 commit into
mainfrom
feat/opencode-tool-starts-20261019

Conversation

@drewstone

Copy link
Copy Markdown
Owner

Problem. opencode run --format json prints 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 enters running, 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.ts against real opencode 1.18.33 on GTR: 1/1 passed (a scripted bash call 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

… 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 tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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

@drewstone
drewstone merged commit cdf9292 into main Oct 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants