Exported CLAUDE_CONFIG_DIR in /etc/profile.d clobbers user overrides in login shells

Open Beginner friendly
#33 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Read hooks/setup-base at the linked line and inspect how CLAUDE_CONFIG_DIR is exported for login shells. Remove the clobbering behavior so a deliberate user setting is preserved, then verify that the documented default still applies when no user override exists.

Written by the indexing model from the issue text.

Description

https://github.com/canonical/claude-code-sdk/blob/e51f6b603af881f8eb1d78a2d70485cd5683a8cc/hooks/setup-base#L5

A login shell will override a user's own CLAUDE_CONFIG_DIR. This exported value is Claude Code's documented default [0], so the change should only have an effect when it is clobbering a deliberate user setting.

Suggest dropping this line. I currently remove this after every workstation refresh.

[0] https://code.claude.com/docs/en/claude-directory

Dominant language
Shell
Stars
2
Forks
1
Avg merge
1h 3m
Merged PRs (30d)
4

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 canonical/claude-code-sdk

All issues in canonical/claude-code-sdk

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.