Skip to content

account module ignores CLAUDE_CONFIG_DIR — shows the default account in multi-account setups #194

Description

@gati3478

I run several Anthropic accounts, each in its own CLAUDE_CONFIG_DIR. On macOS, Claude Code stores each account's token in the Keychain: the default ~/.claude under Claude Code-credentials, and every other config dir under Claude Code-credentials-<hash>.

cship.account only ever reads the unsuffixed Claude Code-credentials, so in any session that isn't the default account it reports the wrong one — my work session shows my personal org.

Repro:

CLAUDE_CONFIG_DIR=~/.claude-work cship explain | grep account

still resolves the ~/.claude account, not the one for ~/.claude-work.

Expected: resolve the credential the same way Claude Code does — unsuffixed for the default dir, Claude Code-credentials-<hash> otherwise — keyed off CLAUDE_CONFIG_DIR, so the module reflects the session's account. On Linux the equivalent is reading $CLAUDE_CONFIG_DIR/.credentials.json instead of ~/.claude/.credentials.json.

cship 1.8.0, macOS. Likely the same code path as #21.

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