-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: Improve error messages for invalid tool calls #6483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
It's possible this isn't the core issue, so feel free to close if there's a better way to do it. |
Before: ErrorData with message 'exec' After: ErrorData with message 'Tool "exec" not found' Co-Authored-By: Claude Sonnet 4.5 <[email protected]> Signed-off-by: J. Carr <[email protected]>
Downcast to ErrorData before wrapping to avoid nested error codes like '-32603: -32603: -32002: exec'. Co-Authored-By: Claude Sonnet 4.5 <[email protected]> Signed-off-by: J. Carr <[email protected]>
Signed-off-by: J. Carr <[email protected]>
729ae34 to
b82e6fb
Compare
Signed-off-by: J. Carr <[email protected]>
jamadeo
approved these changes
Jan 14, 2026
ThanhNguyxn
pushed a commit
to ThanhNguyxn/goose
that referenced
this pull request
Jan 14, 2026
Signed-off-by: J. Carr <[email protected]> Co-authored-by: Claude Sonnet 4.5 <[email protected]> Signed-off-by: ThanhNguyxn <[email protected]>
zanesq
added a commit
that referenced
this pull request
Jan 14, 2026
…ased * 'main' of github.com:block/goose: fix(code_execution): serialize record_result output as JSON (#6495) perf(google): avoid accumulating thoughtSignatures across conversation history (#6462) fix(openai): make tool_call arguments optional and fix silent stream termination (#6309) fix: Improve error messages for invalid tool calls (#6483) fix: require auth when running goose on non loopback address (#6478) chore(deps): bump hono from 4.11.3 to 4.11.4 in /ui/desktop (#6485) feat(cli): graceful fallback for keyring failures (#5808) fix: support global .gooseignore and negation patterns (#6157) docs: manual config for jetbrains (#6490) fix: Recipe slash command doesn't work with single optional parameter (#6235) fix(openrouter): Handle Gemini thoughtSignature for tool calls (#6370) docs: fix extensions page (#6484) Allow customizing the new line keybinding in the CLI (#5956) Ask for permission in the CLI (#6475) docs: add Ralph Loop tutorial for multi-model iterative development (#6455) Remove gitignore fallback from gooseignore docs (#6480) fix: clean up result recording for code mode (#6343) fix(code_execution): handle model quirks with tool calls (#6352) feat(ui): support prefersBorder option for MCP Apps (#6465) fixed line breaks (#6459)
lifeizhou-ap
added a commit
that referenced
this pull request
Jan 15, 2026
* main: fixed 0 token in openrouter steaming (#6493) feat(goose-acp): enable parallel sessions with isolated agent state (#6392) copilot instruction to flag prelease docs (#6504) docs: acp mcp support (#6491) feat: add flatpak support for linux (#6387) fix(code_execution): serialize record_result output as JSON (#6495) perf(google): avoid accumulating thoughtSignatures across conversation history (#6462) fix(openai): make tool_call arguments optional and fix silent stream termination (#6309) fix: Improve error messages for invalid tool calls (#6483)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Improves error messages for invalid tool calls.
Avoids double-wrapping of error codes
(I'm not sure about that change, honestly, so maybe remove or rewrite)
Type of Change
AI Assistance
This was mostly Claude Code.
I ran the standard tests, and manually verified the error output by forcing an invalid tool call
Testing
Manual testing plus existing
cargo testResult of manual testing was the error message:
-32002: Tool 'container.exec' not found
It didn't have a newline, but perhaps it should. I don't think that's the responsibility of this code
Related Issues
Relates to #5989
Discussion: LINK (if any)
Screenshots/Demos (for UX changes)
Before:
After: