Skip to content

Tool use of claude fails with 400 invalid_request_error #1800

@2mawi2

Description

@2mawi2

Bug Description

Claude sometimes throws 400er errors with invalid_request_error messages for tool_use. See stacktrace.

User:
just compare our version with the web syntax and think deeply about this
problem first
Claude:

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","mes
sage":"messages.30: tool_use ids were found without tool_result blocks
immediately after: toolu_01HTRsNgRWGMmM61dMqVHffX. Each tool_use block
must have a corresponding tool_result block in the next message."}}

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","mes
sage":"messages.30: tool_use ids were found without tool_result blocks
immediately after: toolu_01HTRsNgRWGMmM61dMqVHffX. Each tool_use block
must have a corresponding tool_result block in the next message."}}

this was the commadn it executed before:

"""

⏺ Now let me test this approach:

⏺ Bash(just list)
⎿ Error: error: Expected '@', '[', comment, end of file, end of line, or
identifier, but found '*'
——▶ justfile:14:1

14 │ *args:
│ ^

⏺ It seems the wildcard syntax isn't supported in this version. Let me check
what just version supports this feature:
"""

Previous tool usages worked fine. Restart of claude resolves the issue.

Environment Info

  • Platform: macos
  • Terminal: cursor (fish shell)
  • Version: 1.0.17
  • Feedback ID: 949c427e-aa8d-4540-9a58-b989772ef7c3

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:coreautocloseIssue will be closed automaticallybugSomething isn't workingduplicateThis issue or pull request already existshas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions