Summary
ucode hardcodes the Claude config directory to ~/.claude and ignores the
CLAUDE_CONFIG_DIR environment variable that Claude Code itself supports:
|
CLAUDE_CONFIG_DIR = Path.home() / ".claude" |
|
CLAUDE_SETTINGS_PATH = CLAUDE_CONFIG_DIR / "ucode-settings.json" |
Impact
I keep two Claude accounts on the same machine — a personal one in ~/.claude
and a work one in ~/.claude-work — and set CLAUDE_CONFIG_DIR automatically
based on the directory I'm in. Because ucode always reads and writes
~/.claude, its Claude configuration and validation steps fail whenever I'm
working under the work account.
Proposed fix
Resolve the config directory from the environment, falling back to the current
default:
CLAUDE_CONFIG_DIR = Path(os.environ.get("CLAUDE_CONFIG_DIR", Path.home() / ".claude"))
This matches Claude Code's own behavior and is backward compatible for anyone
who doesn't set the variable.
Summary
ucodehardcodes the Claude config directory to~/.claudeand ignores theCLAUDE_CONFIG_DIRenvironment variable that Claude Code itself supports:ucode/src/ucode/agents/claude.py
Lines 43 to 44 in 6d238e6
Impact
I keep two Claude accounts on the same machine — a personal one in
~/.claudeand a work one in
~/.claude-work— and setCLAUDE_CONFIG_DIRautomaticallybased on the directory I'm in. Because
ucodealways reads and writes~/.claude, its Claude configuration and validation steps fail whenever I'mworking under the work account.
Proposed fix
Resolve the config directory from the environment, falling back to the current
default:
This matches Claude Code's own behavior and is backward compatible for anyone
who doesn't set the variable.