Claude Code does not handle new OAuth after archiving workspace
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version:
v0.3.6<!-- 使用claude --version获取最新的实际版本号 --> - Operating System: macOS 14.3
- Terminal: Terminal App (zsh)
Bug Description
I've successfully completed OAuth authentication for Claude Code CLI, and the Anthropic website confirmed my setup with the message:
"You’re all set up for Claude Code. You can now close this window."
However, when I attempt to use the Claude Code CLI (claude), it immediately returns the following error:
API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}}
My Anthropic console shows newly generated API keys in the Claude Code workspace, but the CLI still cannot authenticate successfully.
Steps to Reproduce
- Install Claude Code CLI globally via npm (
npm install -g @anthropic-ai/claude-code) - Run the OAuth authentication (
claude auth login) - Complete OAuth successfully (confirmed by webpage)
- Run
claudecommand in the terminal - Encounter the 403 forbidden error above.
Expected Behavior
Claude Code CLI should authenticate successfully after OAuth, and I should be able to interact normally with the CLI.
Actual Behavior
Claude Code CLI immediately returns a 403 forbidden error ("Request not allowed") every time it is launched.
Additional Context
- My Anthropic account billing is active, with sufficient funds.
- Network proxy and connectivity have been verified as working correctly.
- My Anthropic account email is
bobbyding.dy@gmail.com.
Additionally, I observed unexpected behavior in the Anthropic API key management page:
- The API keys associated with Claude Code workspace never show as successfully created (they remain stuck in a pending state without workspace details).
- When attempting to delete these seemingly unsuccessful keys, I consistently receive a
"Not found"error, and the keys remain undeleted.
This might indicate a backend issue on Anthropic’s side causing the keys to remain unrecognized or improperly provisioned.
Screenshots:
- API keys stuck without workspace information:
<img width="969" alt="Image" src="https://github.com/user-attachments/assets/f27f1c38-321b-4e0a-9e68-c8565382250b" />
- Error (
"Not found") when attempting to delete these keys:
<img width="972" alt="Image" src="https://github.com/user-attachments/assets/bef9f4bf-b17a-49ed-b3d4-f9dd3df6f096" />
---
This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗