[BUG] statusline-setup subagent ignores CLAUDE_CONFIG_DIR, always reads/writes ~/.claude/

Resolved 💬 1 comment Opened May 1, 2026 by boticlawn Closed Jun 1, 2026

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

  1. Start Claude Code with a custom config dir:

``bash
CLAUDE_CONFIG_DIR=~/.claude-private claude
``

  1. Confirm the session is using .claude-private (settings, statusline command, plugins all load from there).
  2. Run /statusline — this dispatches the statusline-setup subagent.
  3. 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.sh directly 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_DIR env var ignored; still loads ~/.claude/CLAUDE.md
  • #55065 — CLAUDE_CONFIG_DIR semantics inconsistent (settings under .claude/ but skills at root)
  • #38641 — /context displays hardcoded ~/.claude/CLAUDE.md path
  • #42217 — MCP servers from mcp.json not loaded when CLAUDE_CONFIG_DIR is 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_DIR unset) and ~/.claude-private/ (CLAUDE_CONFIG_DIR=~/.claude-private)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗