claude-code - 💡(How to fix) Fix [Bug] Bash tool not auto-sourcing CLAUDE_ENV_FILE in shell initialization [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51862Fetched 2026-04-23 07:42:55
View on GitHub
Comments
1
Participants
1
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1mentioned ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

Bug Description The underlying issue is that CLAUDE_ENV_FILE is set but doesn't appear to be automatically sourced by the Bash tool's shell initialization. This might be a Claude Code configuration issue — the env file is recognized but the shell instances spawned by the Bash tool aren't picking it up automatically. You may want to file this as an issue or check if there's an additional setting needed to make CLAUDE_ENV_FILE auto-source in each shell invocation.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.104
  • Feedback ID: 753d4160-2a2e-44ea-974f-953b5a306dd8

extent analysis

TL;DR

The issue can be likely resolved by configuring the Bash tool to automatically source the CLAUDE_ENV_FILE in each shell invocation.

Guidance

  • Check the Claude Code configuration for an option to auto-source the CLAUDE_ENV_FILE in each shell invocation.
  • Verify that the CLAUDE_ENV_FILE is correctly formatted and contains the expected environment variables.
  • Investigate if there's an additional setting or command required to enable auto-sourcing of the CLAUDE_ENV_FILE in the Bash tool.
  • Consider filing an issue with the Claude Code team to report the problem and request assistance.

Notes

The solution may depend on the specific configuration and version of the Bash tool and Claude Code, which are not provided in the issue description.

Recommendation

Apply workaround: The user should try to configure the Bash tool to auto-source the CLAUDE_ENV_FILE or manually source it in each shell invocation as a temporary solution, while waiting for a potential fix or guidance from the Claude Code team.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING