[BUG] API Error: 400

Resolved 💬 5 comments Opened Dec 4, 2025 by tomhnguyen-dev Closed Feb 5, 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?

I got error when type any command in Claude Code:

Error: Error during compaction: Error: API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"Not a valid API key for this
workspace"},"request_id":"req_011CVnHKp9Nc2U1aaNyUaEgZ"}

What Should Happen?

Claude should do something

Error Messages/Logs

Steps to Reproduce

type /compact or /version or @filename.... anything

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude --version ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Not a valid API key for this workspace"},"request_id":"req_011CVnHioN92Pk9XzRYELE6J"}

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PyCharm terminal

Additional Information

_No response_

View original on GitHub ↗

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