Skip to content

claudio install ignores CLAUDE_CONFIG_DIR (hooks land in ~/.claude even when Claude Code uses an alternate config dir) #32

Description

@ThalynLabs

Version: claudio 1.14.0
OS: macOS (Darwin 27.0.0, Apple Silicon)
Agent: claude

Symptom

claudio install always resolves the Claude Code settings file as
$HOME/.claude/settings.json, ignoring CLAUDE_CONFIG_DIR. Claude Code
honors that variable as the location of its config directory (including
settings.json), so on any setup that uses it, claudio install writes
hooks into a profile Claude Code is not reading — and modifies the default
profile that was not the target.

Reproduction

Dry-run makes it visible without touching anything:

$ CLAUDE_CONFIG_DIR=/tmp/alt-claude-profile claudio install --dry-run --agent claude
Settings path: /Users/<user>/.claude/settings.json

Expected settings path: /tmp/alt-claude-profile/settings.json.

Setting a fake HOME confirms the resolution follows HOME only:

$ HOME=/tmp/fake-home CLAUDE_CONFIG_DIR=/tmp/alt-claude-profile claudio install --dry-run --agent claude
Settings path: /tmp/fake-home/.claude/settings.json

Where in source

internal/install/claude_settings.go builds the candidate list from the
home directory only (filepath.Join(homeDir, ".claude", "settings.json"),
lines ~30–40); nothing in the file consults CLAUDE_CONFIG_DIR.

Expected behavior

When CLAUDE_CONFIG_DIR is set, the claude agent's settings path should be
$CLAUDE_CONFIG_DIR/settings.json, falling back to ~/.claude/settings.json
when it is unset — matching how Claude Code itself resolves the directory.

Why it matters

Multiple-profile setups (work/personal, or a locked-down profile for
automation) rely on CLAUDE_CONFIG_DIR for isolation. Today claudio install run against such a profile both misses the intended target and
silently adds hooks to the default profile. The workaround is editing the
alternate profile's settings.json by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions