claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Two Claude Code sessions in the same folder / project share chat history when they should be separate.

Open CryptVenture opened this issue 3 months ago • 5 comments

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?

When I start two Claude code sessions in the same folder, they seem to share history - which means they get mixed up with each others tasks. For example, if I start one Claude Code Session to do debugging and another to do feature development - the one will have the chat history of the other. After a particular task has been completed, the debugging instance starts to do Feature development because it seems to have access to the chat history of the other (e.g. if you use the up arrow when you are in the code interface you can up arrow to the prompts from the other instance). This means that Claude Code eventually stops following explicit instructions and does what it likes.

What Should Happen?

Each instance in the same project should be isolated from ther others. Even when resuming a chat --resume, the instance should be isolated and every chat interface should maintain its own context and chat history - the only time that things should be recalled is when you --resume an instance, then that instance's messaging, context, prompts etc should all be retrieved and used.

Error Messages/Logs


Steps to Reproduce

Open two instances of Claude code in the same project folder. Give each instance a task and watch as when one instance completes the task (often after a compaction) it will have context, prompting and history from the other instance.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.0.115 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

CryptVenture avatar Sep 16 '25 13:09 CryptVenture