Conversation history lost when changing directories with cd command
Resolved 💬 8 comments Opened Jul 31, 2025 by enraku Closed Jan 21, 2026
Bug Description
Conversation history is not recorded after changing to a subdirectory using the cd command. All conversations that occur after cd subdirectory are lost and not available in subsequent sessions.
Environment
- Platform: WSL2 (Ubuntu 24.04)
- Claude Code versions tested: 1.0.64 and 1.0.40
- Verified on clean installation with no custom configurations
Steps to Reproduce
- Start claude in a project directory
- Have a conversation (e.g., "What's your favorite animal?")
- Create and cd into a subdirectory:
mkdir abc && cd abc - Continue conversation (e.g., "What's your favorite food?")
- Return to parent directory:
cd .. - Continue conversation (e.g., "What's your favorite movie?")
- Exit with
/exit - Start new session with
claude -c - Observe that only the conversation before
cd abcis remembered
Expected Behavior
All conversations should be recorded and available in subsequent sessions, regardless of the current working directory.
Actual Behavior
- Conversations in the main directory: ✅ Recorded
- Conversations after
cd subdirectory: ❌ Lost - Conversations after returning with
cd ..: ❌ Lost
Impact
This is a critical issue for developers who:
- Work across multiple subdirectories during development
- Lose important context and decisions made during subdirectory work
- Cannot resume conversations properly after directory changes
- May not realize conversations are being lost until starting a new session
Additional Information
- Tested on multiple Claude Code versions with same result
- Reproduced on clean WSL2 installation
- No error messages or warnings are shown
- Users have no way to know their conversations aren't being recorded
This appears to be a fundamental issue with how Claude Code tracks conversation history relative to directory changes.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗