claude-code - 💡(How to fix) Fix Getting Error while using Sonnet - 4.6 in copilot

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: (query) Execution failed: CAPIError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.64: tool_use ids were found without tool_result blocks immediately after: toolu_vrtx_01DKnVMfHy5NjqGjXp7V4RLY. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_vrtx_011CbYQPWTCfSAnGJSQ4k32V"} (Request ID: 7F75:160510:27CFAC7:2D5370B:6A1A99A0) i am trying to find solution.....still getting the error

Error Messages/Logs

Error: (query) Execution failed: CAPIError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.64: tool_use ids were found without tool_result blocks immediately after: toolu_vrtx_01DKnVMfHy5NjqGjXp7V4RLY. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_vrtx_011CbYQPWTCfSAnGJSQ4k32V"} (Request ID: [7F75:160510:27CFAC7:2D5370B:6A1A99A0)....](

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Error: (query) Execution failed: CAPIError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.64: tool_use ids were found without tool_result blocks immediately after: toolu_vrtx_01DKnVMfHy5NjqGjXp7V4RLY. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_vrtx_011CbYQPWTCfSAnGJSQ4k32V"} (Request ID: 7F75:160510:27CFAC7:2D5370B:6A1A99A0)

What Should Happen?

i am trying to find solution.....still getting the error

Error Messages/Logs

Steps to Reproduce

how can we correct the issue?

Copilot CLI Error: (query) Execution failed: CAPIError: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.64: tool_use ids were found without tool_result blocks immediately after: toolu_vrtx_01DKnVMfHy5NjqGjXp7V4RLY. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_vrtx_011CbYQPWTCfSAnGJSQ4k32V"} (Request ID: [7F75:160510:27CFAC7:2D5370B:6A1A99A0)....](

<img width="1337" height="715" alt="Image" src="https://github.com/user-attachments/assets/4659935a-b4fe-41ad-b003-124ba0f77f00" />

)

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Sonnet 4.6

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Getting Error while using Sonnet - 4.6 in copilot