You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] CLAUDE_ENV_FILE not sourced on resumed sessions (--continue) #12418
I have searched existing issues and this hasn't been reported yet
This is a single bug report (please file separate reports for different bugs)
I am using the latest version of Claude Code
What's Wrong?
When using claude --continue or claude --resume, the CLAUDE_ENV_FILE written by SessionStart hooks is not
sourced, even though the hooks run successfully.
What Should Happen?
Environment variables written to CLAUDE_ENV_FILE during SessionStart hooks should be available in subsequent Bash
commands, regardless of whether the session is fresh or resumed.
Fresh session: CLAUDE_ENV_FILE is sourced correctly ✓
Resumed session: Hook runs, writes to file, but variables NOT available ✗
Error Messages/Logs
Steps to Reproduce
Create SessionStart hook writing to CLAUDE_ENV_FILE
Fresh start: claude → echo $TEST_VAR → works
Resume: claude --continue → echo $TEST_VAR → empty
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.52
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Use Case
Loading .envrc (direnv) at session start. Users use --continue for context but lose environment.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Nov 26, 2025
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
github-actions commentedon Nov 29, 2025
This issue has been automatically closed as a duplicate of #11649.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
github-actions commentedon Dec 6, 2025
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.