- Symptom
- A --bare run fails on authentication while the same command without --bare worksCI job that relies on a subscription login breaks after adding --bare
- Cause
- Bare mode never reads OAuth credentials or the system keychain, so a Claude subscription login is not used. Amazon Bedrock, Google Cloud, and Microsoft Foundry keep reading their own credentials.
- Fix
- Set ANTHROPIC_API_KEY to a key created in the Claude Console, or supply an apiKeyHelper in the --settings JSON.
- Apply
claude --bare -p "task" --settings '{"apiKeyHelper": "~/bin/get-anthropic-key.sh"}'- Affected
- Claude Code --bare mode, as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders