Skip to content

Claude Code does not handle new OAuth after archiving workspace #597

Description

@alin-ap

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: v0.3.6
  • 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

  1. Install Claude Code CLI globally via npm (npm install -g @anthropic-ai/claude-code)
  2. Run the OAuth authentication (claude auth login)
  3. Complete OAuth successfully (confirmed by webpage)
  4. Run claude command in the terminal
  5. 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:

  1. API keys stuck without workspace information:
Image
  1. Error ("Not found") when attempting to delete these keys:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions