[BUG] CLAUDE_ENV_FILE not sourced on resumed sessions (--continue)

Resolved 💬 3 comments Opened Mar 13, 2026 by yodahuang Closed Mar 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

This is the same issue as the previously closed ticket #12418

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.7.15

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗