[--bare] Bare mode skips OAuth/keychain — unusable for OAuth-only setups

Resolved 💬 3 comments Opened Mar 26, 2026 by jayleekr Closed Mar 29, 2026

Summary

--bare mode documentation says it skips auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. However, it also skips OAuth/keychain authentication, which makes it unusable for users who authenticate via claude.ai login (OAuth) rather than ANTHROPIC_API_KEY.

Reproduction

# User authenticated via: claude login (OAuth / claude.ai)
# No ANTHROPIC_API_KEY set

# Normal mode works:
claude -p 'echo hello' --max-turns 1
# ✅ Success

# Bare mode fails:
claude --bare -p 'echo hello' --max-turns 1
# ❌ 'Not logged in · Please run /login'

Expected behavior

--bare should skip project-level auto-discovery (hooks, skills, plugins, CLAUDE.md) but still respect user-level authentication (OAuth tokens, keychain). These are different concerns:

  • Project config (hooks/skills/plugins) → skip in bare ✅
  • User auth (OAuth/keychain) → should NOT be skipped

Workaround

None currently. Cannot use --bare with OAuth auth. The only option is running without --bare and accepting all the auto-loaded context.

Environment

  • Claude Code v2.1.84
  • macOS 14.6 (arm64)
  • Auth: OAuth via claude login (claude.ai)
  • CLAUDE_CODE_OAUTH_TOKEN env var set (also ignored by --bare)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗