⌨️CLAUDE_CODE_OAUTH_REFRESH_TOKEN
Also known as CLAUDE_CODE_OAUTH_SCOPES
It lets claude auth login sign in with no browser.
Think of it like
It is like you swap a ticket at the desk. You get a new wristband.
Example
Lucy builds machines for her team with a script. It sets the refresh token and scopes, then runs claude auth login, so each machine is signed in when it starts.
Why it matters
A machine with no screen can still be signed in to a Claude plan.
Definition
Example code
bash
export CLAUDE_CODE_OAUTH_REFRESH_TOKEN=your-refresh-token
export CLAUDE_CODE_OAUTH_SCOPES="user:profile user:inference"
claude auth loginCommon mistake
Key takeaways
- 1Swapped at login. No browser.
- 2Needs the scopes. Both variables.
- 3Not from project files. Ignored there.