--bare flag strips auth credentials, making it non-functional
Open 💬 1 comment Opened Jun 15, 2026 by lukeloxton1
Summary
claude -p --bare 'hello' returns "Not logged in · Please run /login" on a session that is fully authenticated without --bare.
Steps to reproduce
claude -p 'hello' # works fine
claude -p --bare 'hello' # "Not logged in · Please run /login"
Expected behaviour
--bare strips environmental contamination (CLAUDE.md, hooks, MCP, plugins, settings) but auth is not part of the environment — it is identity. A bare session should still use the existing session credential.
Actual behaviour
The session token / OAuth credential is not found when --bare is active, making the flag completely non-functional.
Environment
- Claude Code version: 2.1.177
- Platform: macOS Darwin 25.5.0
- Auth method: OAuth (not API key)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗