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
tool.execute.before receives an output object with args, but the tool wrapper still executes the tool with the original args variable. If a tool call starts with missing arguments, a hook cannot replace them with a new object.
This affects both native tools and MCP tools. A simple reproducer is a hook that sets output.args = { injected: true } for a zero-arg tool call. The tool still runs without the injected arguments unless the wrapper uses the mutated hook output.
Plugins
A local plugin using tool.execute.before to attach metadata to tool arguments.
OpenCode version
dev branch
Steps to reproduce
Register a tool that can be called without arguments.
Add a tool.execute.before hook that replaces output.args with a new object.
Call the tool without arguments.
Observe that the tool executes with the original missing args instead of the replacement object.
Activity
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.