You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tool: long-running shell calls aborted with 'Tool execution interrupted', partial output lost #63752
Long-running foreground shell tool calls (1-5 min AWS CLI scans / waits) were repeatedly aborted with Tool execution interrupted and all their output was lost, forcing the agent to re-run work.
Environment
opencode version: 2.2.7
OS: macOS (Darwin 25.6.0, arm64)
Terminal: VS Code integrated terminal 1.145.2 (TERM=xterm-256color, TERM_PROGRAM=vscode)
Shell: /bin/zsh
Install/channel: latest
Active plugins: 1 local plugin (~/.config/opencode/plugins/postman.ts)
Reproduction
Start a session and let the agent run a long foreground shell command (e.g. a loop of AWS CLI calls taking several minutes, timeout set to 120-300s).
While it runs, type and send a new message in the prompt (e.g. a follow-up or "status?").
Observe the running tool call.
Expected Behavior
Either the running tool call finishes and the new message is queued, or the user is clearly told that sending a message will abort the running tool. Partial output collected so far should be kept.
Actual Behavior
The tool call ends with {"error":{"type":"aborted","message":"Tool execution interrupted"},"content":[]} and no partial output is returned. Happened ~8 times in one session.
Additional Context
Not 100% sure every abort was caused by sending a message; some may have happened without user input.
Workaround: running commands with background: true avoided the problem.
Thanks for the detailed report. I couldn't reproduce the abort on 2.2.7.
What I tried: the TUI with a simulated model. The model ran a ~25-second foreground shell loop (for i in $(seq 1 25); do echo tick-$i; sleep 1; done, timeout 300000). Partway through I typed status? and pressed Enter. The shell call kept running and finished, and the model got the full output. My follow-up was delivered after the command completed. There was no Tool execution interrupted. That matches how it is meant to work: plain Enter while OpenCode is working steers the session, and the message is picked up at the next step boundary, not by stopping the running tool. I tested on Linux, not macOS or the VS Code terminal, and without your plugin.
On the lost output: when a shell call is interrupted, 2.2.7 discards what it had printed so far. That is tracked in #39565, and a fix (#62977) landed on dev after 2.2.7.
To find what is stopping your calls, these would help:
Around one of the aborts, did the session show a message like "The server restarted while you were working…"? Could you share the opencode.log lines from a minute before to a minute after an abort, with anything private removed? A restart of the background service would interrupt running tools without any input from you (see tui: shared service is killed after 45s of SSE silence, causing cross-session restart loops #63357, also 2.2.7 in the VS Code terminal with a plugin installed).
Could an Esc keypress have reached the TUI while you typed? Esc interrupts the running work.
Does it still happen with ~/.config/opencode/plugins/postman.ts temporarily removed?
Did you send with plain Enter, or with Ctrl+X then Enter (queue)?
Activity
opencodejr commentedon Nov 13, 2026
Thanks for the detailed report. I couldn't reproduce the abort on 2.2.7.
What I tried: the TUI with a simulated model. The model ran a ~25-second foreground shell loop (
for i in $(seq 1 25); do echo tick-$i; sleep 1; done, timeout 300000). Partway through I typedstatus?and pressed Enter. The shell call kept running and finished, and the model got the full output. My follow-up was delivered after the command completed. There was noTool execution interrupted. That matches how it is meant to work: plain Enter while OpenCode is working steers the session, and the message is picked up at the next step boundary, not by stopping the running tool. I tested on Linux, not macOS or the VS Code terminal, and without your plugin.On the lost output: when a shell call is interrupted, 2.2.7 discards what it had printed so far. That is tracked in #39565, and a fix (#62977) landed on
devafter 2.2.7.To find what is stopping your calls, these would help:
opencode.loglines from a minute before to a minute after an abort, with anything private removed? A restart of the background service would interrupt running tools without any input from you (see tui: shared service is killed after 45s of SSE silence, causing cross-session restart loops #63357, also 2.2.7 in the VS Code terminal with a plugin installed).~/.config/opencode/plugins/postman.tstemporarily removed?Related issues:
dev, not in 2.2.7)Tool execution interrupted