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

New chat/session appears to retain prior conversation's live context (not just persistent memory)

Open ravi-kasha opened this issue 3 months ago • 2 comments

Environment

  • Claude Code 2.1.234 (VSCode extension)
  • VSCode 3.17.19
  • darwin/arm64

Description

User reports starting a brand-new chat session in the VSCode extension. The new session's transcript contained full live conversational content and task state from what the user says was a prior, separate conversation, including specific tool-call results and follow-on actions taken based on that earlier context.

This is distinct from Claude Code's intentional cross-session memory feature (~/.claude/projects/<project>/memory/MEMORY.md), which is designed to persist facts/preferences across sessions and is loaded via a system-reminder at conversation start. The issue here is that actual turn-by-turn conversational history/state appears to have carried over, not just recalled memory facts.

Impact

The user has no reliable way to distinguish a fresh session from a continued one, since there was no session-boundary marker visible in the transcript.

Ask

Please clarify expected behavior here, and if this is a regression, help identify what changed.

ravi-kasha avatar Aug 31 '26 10:08 ravi-kasha

Useful measurement split if you want to pin this down before assuming a resume bug:

  1. Session identity — compare the new chat's session/transcript id (and the on-disk transcript path under ~/.claude/projects/...) against the prior chat's. Same id ⇒ continuation; different id ⇒ something else leaked in.
  2. Payload class — classify what carried over:
    • stable facts/preferences from MEMORY.md / system-reminder (expected persistent memory)
    • turn-by-turn tool results, intermediate plans, or "do X next" state (live conversation state — should not appear in a true new session)
  3. Boundary marker — if the UI never shows a session-boundary cue, a fresh-looking panel can still be a resumed buffer. Logging the session id at first message makes that visible.

I've hit the same confusion when "new chat" and "same project memory" look identical in the transcript. Separating durable project decisions (current / rejected / superseded, with why) from live turn state makes it easier to tell whether the bug is resume wiring vs expected memory load — without treating every carryover as memory working as designed.

(If this turns out to be silent resume rather than MEMORY.md, a one-line session-id stamp at conversation start would close a lot of false "memory" reports.)

stonianua avatar Sep 11 '26 11:09 stonianua

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Nov 17 '26 22:11 github-actions[bot]