Repository navigation
tool dispatch: shell tool silently removed mid-session; assistant emits tool-call XML as chat text and cannot build or verify #57541
Description
opencode Issue Report
Summary
Midway through a long session (~20 hours in), the shell/dispatch tool disappeared
from the assistant's available tools without notice. From that point on the
assistant could no longer run commands (compiler, file copy, backups), and it
began emitting raw tool-call XML into the chat transcript instead of executing
the call - producing visible garbage text such as:
<parameter name="path">C:\Users\Owner\.local\share\opencode <parameter name="pattern">**/*
The user saw no progress for many hours and lost confidence in every status
report. The root cause appears to be that the tool catalog changed underneath a
running session, and the assistant had no mechanism to detect this and fail
loudly.
Environment
- opencode version: 2.0.32
- OS: Windows_NT 10.0.19045 (win32 x64)
- Terminal: Unavailable: terminal environment variables are not set
- Shell: C:\WINDOWS\system32\cmd.exe
- Install/channel: latest
- Active plugins: None found in config
Reproduction
- Start a long-running session on Windows with a native C++ build workflow
(MSVCcl.exeinvoked via shell). - Work normally for many hours - builds, file writes, and verification all
succeed. - At some point in the session, the tool catalog is re-published and the
shell/dispatch tool is no longer included. - Continue the session and ask for work that requires running a command.
- Observe: the assistant can no longer execute commands, has no error surfaced
to the user, and begins writing tool-call markup as literal chat text instead
of dispatch.
Expected Behavior
- If a capability is removed mid-session, the session should surface this to the
user explicitly and immediately (e.g. "the shell tool is no longer available in
this session"), rather than letting the assistant continue as if nothing
changed. - A tool call that fails to dispatch should produce an error in the transcript,
never leak raw XML/markup into user-visible chat text. - The tool catalog should be stable for the lifetime of a session, or the change
should be announced as an event the assistant can observe and report.
Actual Behavior
-
The shell tool silently vanished from the available tool set part way through
the session. -
No error was raised. The assistant continued attempting to use the missing
capability. -
Tool-call attempts were emitted as plain chat text, producing visible garbage
in the transcript:<parameter name="path">C:\Users\Owner\.local\share\opencode <parameter name="pattern">**/* -
The user could no longer tell the difference between "working", "stalled", and
"finished", and became unable to trust any claimed result. -
Roughly 10 hours of a multi-day project were lost, and the user's
build/verification workflow broke completely.
Additional Context
- The failure is reproducible within the affected session - it occurs on
every attempt to execute a command. - It is not attributable to the user's machine: Windows, Visual Studio, and
the filesystem all behaved normally; the fault is in tool availability and
dispatch within opencode. - Frequency: continuous once it began - every command-dependent request after
the catalog change failed. - Impact scope: any long-running session where the tool catalog changes
mid-run. On Windows this is especially damaging because shell access is the
only way to invoke a compiler, so the session becomes incapable of verifying
its own work while still appearing to be active. - Workarounds tried: none succeeded. Asking the assistant to re-run the
command, to check its environment, and to restart the investigation all
produced the same non-dispatch behaviour. Only ending the session is expected
to clear it.
Requested Fix (priority order)
- Never leak tool-call markup into chat text; if dispatch fails, render an
explicit error instead. - Detect and announce mid-session tool-catalog changes as a visible system
message, so the assistant and the user both know a capability was removed. - Keep the shell tool available for the full lifetime of a session, or provide
a supported replacement before removing it. - Add a guard that blocks the assistant from emitting
<parameter/<invoke
text into user-visible messages.
Reporting note
Reported against opencode 2.0.32; the dispatch failure was addressed in 2.1.1. Filed for the record so the incident details and the requested guards (no raw tool-call markup in chat text, announce mid-session tool-catalog changes) stay available for regression reference.
Activity
opencode-agent commentedon Oct 20, 2026
Thanks for the report, @SabreTrek. Before we can act on it, we need a few details:
opencode/big-pickleoranthropic/claude-...). Raw<parameter name="...">text in chat usually means the model wrote its tool call as plain text instead of making a real tool call, so the model matters.You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done editing.
Possibly related issues, ordered by likelihood:
<invoke>/<parameter>tool-call markup as plain text on 2.0.32, the call is dropped and the session stalls. This is the same symptom you describe.opencode-agent commentedon Oct 23, 2026
We haven't heard back, so I'm closing this issue for now, @SabreTrek. To look into it we'd still need three things: which provider and model you were using, any evidence that the shell tool was actually removed (an error, an "Instructions updated" notice or log lines), and whether the problem still happens on 2.1.1. You also mentioned it was fixed there.
If it happens again on a current version, please reply here with those details or open a new issue, and we'll take another look. The raw
<parameter name=...>text in chat is also being tracked in #57344.