`/remote-control` rejects a valid full-scope login when CLAUDE_CODE_OAUTH_TOKEN is set in the environment
What happens: /remote-control always returns "Remote Control requires a full-scope login token. Long-lived tokens (from claude setup-token or CLAUDE_CODE_OAUTH_TOKEN) are limited to inference-only for security reasons. Run claude auth login to use Remote Control." — even immediately after a successful claude auth login in the same terminal.
Root cause (suspected): When CLAUDE_CODE_OAUTH_TOKEN is exported in the environment, the running CLI process resolves that token at startup and prefers it over the keychain credential. A subsequent claude auth login writes a fresh full-scope credential, but the already-running process never re-resolves, so /remote-control keeps reading the inference-only env token and refuses.
Repro:
- Export
CLAUDE_CODE_OAUTH_TOKEN(e.g. from~/.zshrcor a project.envrc). - Start
claude, run/remote-control→ inference-only error. - Run
claude auth loginin the same terminal, confirm "Login successful." - Run
/remote-controlagain → same error, despite a valid full-scope login existing.
Expected: Either (a) /remote-control re-resolves credentials on invocation and uses the fresh full-scope login, or (b) the error message tells the user the env var is overriding their login and names it, rather than pointing only at claude auth login, which cannot fix it for the current process.
Workaround: unset CLAUDE_CODE_OAUTH_TOKEN, remove the export from shell config, start a new session.
Environment: Claude Code CLI, macOS (Darwin 25.5.0), model Opus 4.8.
🤖 Generated with Claude Code