Skip to content

[BUG] tool_use ids were found without tool_result blocks immediately after #5705

@sbrkopac

Description

@sbrkopac

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other: Claude Code on WSL2
  • Claude CLI version: 1.0.77 (Claude Code)
  • Operating System: Ubuntu WSL2

Bug Description

I terminated: Bash (mkdir -p folder) with double escape and my next command I receieved:

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

Steps to Reproduce

Haven't been able to reproduce

Expected Behavior

It should have accepted the next prompt and not 400'd

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    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