[BUG] statusline-setup subagent ignores CLAUDE_CONFIG_DIR, always reads/writes ~/.claude/
Summary
When Claude Code is started with a non-default config dir via CLAUDE_CONFIG_DIR, the bundled statusline-setup subagent still operates on ~/.claude/ instead of the active profile, silently editing the wrong settings file.
Reproduction
- Start Claude Code with a custom config dir:
``bash``
CLAUDE_CONFIG_DIR=~/.claude-private claude
- Confirm the session is using
.claude-private(settings, statusline command, plugins all load from there). - Run
/statusline— this dispatches thestatusline-setupsubagent. - Observe its tool calls in the UI:
````
Read(~/.claude/settings.json)
Read(~/.claude/statusline-command.sh)
It reads (and would edit) the default profile, not the active one.
Expected
statusline-setup should resolve config paths via CLAUDE_CONFIG_DIR (falling back to ~/.claude/ only when unset), so it modifies the same profile the running session uses.
Actual
Paths appear to be hard-coded to ~/.claude/. Edits land in the default profile while the active session reads from a different one — the user has to either manually instruct the agent to use the right path, or bypass it and edit files manually.
Workaround
Either:
- Append an explicit instruction when invoking the slash command:
/statusline (use ~/.claude-private/ paths, not the default ~/.claude/)
- Or skip the subagent entirely and edit
settings.json+statusline-command.shdirectly under the active config dir.
Possibly related
This looks like the same class of bug as several other CLAUDE_CONFIG_DIR-related reports — bundled tooling not consistently honoring the env variable:
- #47056 —
CLAUDE_CONFIG_DIRenv var ignored; still loads~/.claude/CLAUDE.md - #55065 —
CLAUDE_CONFIG_DIRsemantics inconsistent (settings under.claude/but skills at root) - #38641 —
/contextdisplays hardcoded~/.claude/CLAUDE.mdpath - #42217 — MCP servers from
mcp.jsonnot loaded whenCLAUDE_CONFIG_DIRis set
Other bundled subagents likely share the same limitation if they touch profile paths (e.g. keybindings-help).
Environment
- macOS Darwin 25.2.0
- Claude Code
2.1.126 - Two profiles:
~/.claude/(default,CLAUDE_CONFIG_DIRunset) and~/.claude-private/(CLAUDE_CONFIG_DIR=~/.claude-private)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗