claude-code - 💡(How to fix) Fix [BUG] claude /init gives this error - API Error: 400 invalid_request with error `tool-search-tool-2025-10-19` for the `anthropic-beta` header. [1 participants]

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…
GitHub stats
anthropics/claude-code#52058Fetched 2026-04-23 07:37:39
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×5closed ×1

Error Message

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s) tool-search-tool-2025-10-19 for the anthropic-beta header. Please consult our documentation at docs.anthropic.com or try again without the header."},"request_id":"req_vrtx_011CaKAts56QzLf2nwX3AUpF"}

Code Example

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s)
     `tool-search-tool-2025-10-19` for the `anthropic-beta` header. Please consult our documentation at
     docs.anthropic.com or try again without the header."},"request_id":"req_vrtx_011CaKAts56QzLf2nwX3AUpF"}
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?

I have installed claude code in my local machine Tried to execute claude /init from terminal - powershell from my WIndows machine. I thought since I do not have node in Windows machine I installed node. I also installed npm install -g @anthropic-ai/claude-code@latest However, I get this error on executing /init API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s) tool-search-tool-2025-10-19 for the anthropic-beta header. Please consult our documentation at docs.anthropic.com or try again without the header."},"request_id":"req_vrtx_011CaKAts56QzLf2nwX3AUpF"}

What Should Happen?

On running the /init command it should generate the claude.md file for my project application path.

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s)
     `tool-search-tool-2025-10-19` for the `anthropic-beta` header. Please consult our documentation at
     docs.anthropic.com or try again without the header."},"request_id":"req_vrtx_011CaKAts56QzLf2nwX3AUpF"}

Steps to Reproduce

Go to Project path using powershell. Run command > claude Then run >/init

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.117 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

extent analysis

TL;DR

Remove the anthropic-beta header or update its value to a valid one to resolve the API Error 400.

Guidance

  • The error message indicates an invalid value for the anthropic-beta header, suggesting that the issue lies in the request headers being sent to the Anthropic API.
  • Try removing the anthropic-beta header or updating its value to a valid one, as suggested in the error message.
  • Consult the documentation at docs.anthropic.com for more information on valid header values.
  • Verify that the claude command is configured correctly and that the @anthropic-ai/claude-code package is installed and up-to-date.

Example

No code snippet is provided as the issue seems to be related to the request headers and not the code itself.

Notes

The issue may be related to a change in the Anthropic API or the claude-code package, and resolving the issue may require updating the package or modifying the request headers.

Recommendation

Apply workaround: Remove or update the anthropic-beta header to a valid value, as this is the most direct solution to the error message.

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