Skip to content

[BUG] API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.16... #1881

@BenAWise

Description

@BenAWise

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version:
  • Operating System:
  • Terminal:

Bug Description

spits out this error and stops working (I need to start a new instance):
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.16: tool_use ids were found without tool_result blocks immediately after:
toolu_01ENfqixDcscyvWNA4g95Ucw. Each tool_use block must have a corresponding tool_result block in the next message."}}

Steps to Reproduce

  1. Start Claude in terminal
  2. Ask it to use web search tool in a prompt
  3. Interrupt it via 'esc'

Expected Behavior

That I can 'tell it what to do differently'

Actual Behavior

Stops working re: above bug

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    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