Skip to content

Conversation

@jasoncarr0
Copy link
Contributor

@jasoncarr0 jasoncarr0 commented Jan 13, 2026

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

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with 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 test

Result 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:

@jasoncarr0
Copy link
Contributor Author

jasoncarr0 commented Jan 13, 2026

It's possible this isn't the core issue, so feel free to close if there's a better way to do it.
(E.g. it could be a failure with the __ splitting or something)

@jasoncarr0 jasoncarr0 changed the title Fix: Improve error messages for invalid tool calls fix: Improve error messages for invalid tool calls Jan 13, 2026
jasoncarr0 and others added 3 commits January 13, 2026 16:06
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]>
@jamadeo jamadeo merged commit 355d319 into block:main Jan 14, 2026
18 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants