Bug Description
When CLAUDE_CONFIG_DIR is set to a non-default location (e.g., ~/.config/claude-code/ instead of ~/.claude/), the Claude subprocess fails to authenticate because CLAUDE_CONFIG_DIR is not included in the subprocess environment allowlist.
This results in "Not logged in - Please run login" errors in the Web UI, even when the user is fully authenticated via claude auth status.
Root Cause
packages/core/src/utils/env-allowlist.ts defines SUBPROCESS_ENV_ALLOWLIST — the set of env vars passed to Claude Code subprocesses. CLAUDE_CONFIG_DIR is missing from this list, so when a user has their Claude config in a non-default directory, the subprocess falls back to ~/.claude/ and can't find credentials.
Steps to Reproduce
- Set
CLAUDE_CONFIG_DIR to a non-default path (e.g., ~/.config/claude-code/)
- Authenticate with
claude /login
- Start Archon with
bun run dev
- Send a message via the Web UI
- Observe "Not logged in" error
Fix
Add 'CLAUDE_CONFIG_DIR' to the SUBPROCESS_ENV_ALLOWLIST in packages/core/src/utils/env-allowlist.ts, alongside the other Claude auth/config variables:
// Claude auth and config
+ 'CLAUDE_CONFIG_DIR',
'CLAUDE_USE_GLOBAL_AUTH',
'CLAUDE_API_KEY',
Environment
- macOS (Darwin)
- Claude Code 2.1.101
- Auth method: Claude Max (OAuth via claude.ai)
CLAUDE_CONFIG_DIR=/Users/.../.config/claude-code
Bug Description
When
CLAUDE_CONFIG_DIRis set to a non-default location (e.g.,~/.config/claude-code/instead of~/.claude/), the Claude subprocess fails to authenticate becauseCLAUDE_CONFIG_DIRis not included in the subprocess environment allowlist.This results in "Not logged in - Please run login" errors in the Web UI, even when the user is fully authenticated via
claude auth status.Root Cause
packages/core/src/utils/env-allowlist.tsdefinesSUBPROCESS_ENV_ALLOWLIST— the set of env vars passed to Claude Code subprocesses.CLAUDE_CONFIG_DIRis missing from this list, so when a user has their Claude config in a non-default directory, the subprocess falls back to~/.claude/and can't find credentials.Steps to Reproduce
CLAUDE_CONFIG_DIRto a non-default path (e.g.,~/.config/claude-code/)claude /loginbun run devFix
Add
'CLAUDE_CONFIG_DIR'to theSUBPROCESS_ENV_ALLOWLISTinpackages/core/src/utils/env-allowlist.ts, alongside the other Claude auth/config variables:// Claude auth and config + 'CLAUDE_CONFIG_DIR', 'CLAUDE_USE_GLOBAL_AUTH', 'CLAUDE_API_KEY',Environment
CLAUDE_CONFIG_DIR=/Users/.../.config/claude-code