Skip to content

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

Closed as not planned

Description

@CryptVenture

Preflight Checklist

  • 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 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

Activity

  1. github-actions commented on Sep 16, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Session Isolation Failure - Information Leaking Between Multiple Claude Code Sessions #1985
    2. Two claude sessions will conflict and mix history #1205
    3. [BUG] Context bleeding between concurrent Claude Code sessions #2272

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. CryptVenture commented on Sep 16, 2025

    @CryptVenture
    Author

    This issue is still persisting - it may have been corrected in previous versions, but it seems to have returned. It should be fully checked, as it makes using Claude Code a problem. I think I have given a bit more context on here of my findings.

  3. github-actions commented on Dec 5, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  4. julienld commented on Dec 16, 2025

    @julienld

    Same issue on v2.0.69 in WSL.

    To reproduce:

    1. open 2 claude code in the same directory in 2 terminals
    2. type a message in one
    3. use the up arrow in the second one
    4. the message gets from one session to the other.
  5. lamplighter commented on Dec 31, 2025

    @lamplighter

    this is happening to me too. each claude has its own session id, but they share the same prompt history.

    on 2.0.76, Mac

  6. github-actions commented on Jan 31, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  7. marcindulak commented on Jan 31, 2026

    @marcindulak

    This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at #16497. Please upvote that issue, so maybe it gets noticed.

  8. julienld commented on Jan 31, 2026

    @julienld

    Still having that issue. I also noticed that the /model command apply to both terminals. It's like they share the same namespace.

    I have the same issue on my work account / work computer.

    Does everyone have the issue or just us?

    If someone has that answer, it might help pinpoint the issue. If you have that information, please open the new issue and comment here.

  9. github-actions commented on Feb 8, 2026

    @github-actions

    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.

  10. locked as resolved and limited conversation to collaborators on Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:securitybugSomething isn't workingduplicateThis issue or pull request already existshas reproHas detailed reproduction stepsmemoryplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions