Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.59 ·

Headless Login via Refresh Token

Entry
JSON All of v2.1.59
EntryKind: in v2.1.59,
ChangesSection of the release
What

Log in to Claude Code non-interactively by providing an OAuth refresh token via environment variables, enabling automated CI/CD and headless deployments without a browser.

Usage
export CLAUDE_CODE_OAUTH_REFRESH_TOKEN="your-refresh-token"
export CLAUDE_CODE_OAUTH_SCOPES="user:inference"
claude /login
Details
  • CLAUDE_CODE_OAUTH_SCOPES is required when using the refresh token — the CLI exits with a helpful error message if missing
  • Scopes should be space-separated (e.g., "user:profile user:inference user:sessions:claude_code user:mcp_servers")
  • Bypasses the browser-based OAuth flow entirely
Evidence

Refresh token login flow (search for "CLAUDE_CODE_OAUTH_REFRESH_TOKEN")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.59 →

Feedback