Skip to content

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

Description

@jayleekr

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions