Skip to content

AI_APICallError: messages.3: tool_use ids were found without tool_result blocks immediately after: toolu_01G5ipgNZWmDHuV6cvzyQpfH. Each tool_use block must have a corresponding tool_result block in the next message. #2214

Closed

Description

@CestDiego

Recently been getting these kind of messages when i interrupt a response mid flight in plan mode.

Activity

  1. garrett-hopper commented on Aug 25, 2025

    @garrett-hopper
    Image

    Not much helpful context on why I received this unfortunately. Everything working fine prior. Claude Sonnet 4 model. Opencode v0.5.18

    After it occurs, the session is borked going forward. New messages result in the same error. Restarting opencode and resuming the session doesn't change anything.

  2. garrett-hopper commented on Aug 25, 2025

    @garrett-hopper

    It looks like /undo one message before the error started to occur does resolve the issue. (Though obviously losing the results of that message which was actually successful.)

  3. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions