Description
Summary
OpenCode Desktop exposes an internal fallback tool named invalid in user-facing error output. In some sessions, one malformed tool call can cascade into many repeated invalid call entries, which floods the UI and makes debugging difficult.
Environment
- OpenCode Desktop:
1.4.3
- Platform: Windows
- Install source: Scoop
Actual behavior
Model tried to call unavailable tool ''. Available tools: invalid, question, bash, read, ...
- The UI may then show many repeated
invalid tool-call entries.
Expected behavior
invalid should remain internal and never appear in user-facing available tool lists.
- A malformed tool call should fail once, or be circuit-broken quickly, instead of repeating dozens of times.
Investigation
This does not appear to come from user config. Local config files did not define any invalid tool.
Evidence from the desktop runtime shows:
- An internal tool is explicitly defined:
...\opencode-cli.exe: InvalidTool = Tool2.define("invalid", ...)
- Normal active tools already exclude it:
activeTools: Object.keys(tools).filter((x) => x !== "invalid")
- But unavailable-tool error messages still print an available tools list that includes
invalid:
Model tried to call unavailable tool '${toolName}'. Available tools: ${availableTools.join(", ")}
Likely issue
The runtime seems to filter invalid out of normal active tools, but not out of the error/reporting path. That leaks an internal tool into user-facing output. When the model emits malformed tool calls, the fallback path may repeatedly rewrite them into invalid, causing UI spam.
Requested fix
- Filter
invalid out of all user-facing available-tool lists, including error messages.
- Treat
invalid as strictly internal and do not surface it as a normal tool.
- Add a circuit breaker so repeated malformed tool calls do not produce dozens of
invalid entries.
Preferred result after fix
Instead of:
Model tried to call unavailable tool ''. Available tools: invalid, question, bash, read, ...
It should be:
Model tried to call unavailable tool ''. Available tools: question, bash, read, ...
And the session should show at most one or very few failure entries, not a long invalid spam sequence.
Plugins
oh-my-openagent
OpenCode version
1.4.3
Steps to reproduce
- Launch OpenCode Desktop 1.4.3
- Start a session with normal tool access enabled
- Ask the model to perform a relatively complex tool workflow, especially:
- multiple tool calls in one response
- parallel tool usage
- complex argument structures
- Once the model emits a malformed tool call (common symptom: empty tool name '', or invalid tool name / argument shape)
- Watch the UI / tool call log
Screenshot and/or share link
Operating System
Windows 11
Terminal
OpenCode Desktop
Description
Summary
OpenCode Desktop exposes an internal fallback tool named
invalidin user-facing error output. In some sessions, one malformed tool call can cascade into many repeatedinvalidcall entries, which floods the UI and makes debugging difficult.Environment
1.4.3Actual behavior
invalidtool-call entries.Expected behavior
invalidshould remain internal and never appear in user-facing available tool lists.Investigation
This does not appear to come from user config. Local config files did not define any
invalidtool.Evidence from the desktop runtime shows:
invalid:Likely issue
The runtime seems to filter
invalidout of normal active tools, but not out of the error/reporting path. That leaks an internal tool into user-facing output. When the model emits malformed tool calls, the fallback path may repeatedly rewrite them intoinvalid, causing UI spam.Requested fix
invalidout of all user-facing available-tool lists, including error messages.invalidas strictly internal and do not surface it as a normal tool.invalidentries.Preferred result after fix
Instead of:
It should be:
And the session should show at most one or very few failure entries, not a long
invalidspam sequence.Plugins
oh-my-openagent
OpenCode version
1.4.3
Steps to reproduce
Screenshot and/or share link
Operating System
Windows 11
Terminal
OpenCode Desktop