[BUG] VS Code Extension: "tool_use ids must be unique" API 400 error during multi-step operations

Resolved 💬 11 comments Opened Jan 24, 2026 by tim-fin Closed Feb 28, 2026

Preflight Checklist

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

What's Wrong?

Description

The VS Code extension returns API 400 errors with the message tool_use ids must be unique when Claude executes a series of tool calls or concurrent operations. This is a new issue - I have hundreds of hours of usage without ever seeing this before.

This does NOT occur in:

  • Native terminal CLI (claude command)
  • Claude Desktop app

The issue is isolated to the VS Code extension only.

Key Observations

  • Terminal CLI: Works perfectly, no issues
  • Claude Desktop: Works perfectly, no issues
  • VS Code Extension: Consistent errors - duplicate tool_use IDs being sent
  • First occurrence ever after hundreds of hours of use - likely a recent regression
  • Error appears at message index 17, suggesting it happens after several successful tool calls in a conversation

What Should Happen?

Expected Behavior

Tool calls should have unique IDs and complete without API errors.

Actual Behavior

The extension appears to be generating duplicate tool_use IDs, causing the API to reject the request. Reinstalling the extension temporarily resolves the issue, but it recurs.

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.17.content.1: tool_use ids must be unique"},"request_id":"req_011CXSWBurLBYkTPAkWiaGjx"}

Steps to Reproduce

  1. Open Claude Code in VS Code extension
  2. Ask Claude to perform a task requiring multiple tool calls (e.g., "explore this codebase")
  3. API 400 errors occur consistently with "tool_use ids must be unique" message
  4. Also happens when asking Claude to run tools concurrently/in parallel

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.19

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗