Support Custom $CLAUDE_CONFIG_DIR

Open Beginner friendly
#342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
tooling

Research direction

Start in src/ucode/agents/claude.py at the hardcoded config-directory lines referenced in the issue, and inspect how that path is used for Claude configuration and validation. Done means CLAUDE_CONFIG_DIR is honored when set and the existing ~/.claude path remains the fallback.

Written by the indexing model from the issue text.

Description

Summary

ucode hardcodes the Claude config directory to ~/.claude and ignores the
CLAUDE_CONFIG_DIR environment variable that Claude Code itself supports:

https://github.com/databricks/ucode/blob/6d238e6fefcce2b6833b0ad040b2a59cc4e0abff/src/ucode/agents/claude.py#L43-L44

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.

Dominant language
Python
Stars
97
Forks
75
Avg merge
1d 9h
Merged PRs (30d)
193

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/unity-gateway

All issues in databricks/unity-gateway

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.