claude-code - 💡(How to fix) Fix [BUG] /resume renders an unselected session's transcript and injects synthetic messages into its .jsonl (v2.1.139, Windows PowerShell)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When invoking /resume from a fresh terminal on Windows, with multiple existing sessions in the project, Claude Code renders the full transcript of a different (unselected) session into the terminal before yielding control to the actually-resumed session. The selected session's context is loaded correctly internally, but the displayed scrollback shows the wrong session's history.

Additionally, the unselected (displayed) session's .jsonl log gets two synthetic entries appended at the moment of /resume:

  • a user message "Continue from where you left off." with isMeta: true
  • an assistant message "No response requested." with model: "<synthetic>"

Root Cause

When invoking /resume from a fresh terminal on Windows, with multiple existing sessions in the project, Claude Code renders the full transcript of a different (unselected) session into the terminal before yielding control to the actually-resumed session. The selected session's context is loaded correctly internally, but the displayed scrollback shows the wrong session's history.

Additionally, the unselected (displayed) session's .jsonl log gets two synthetic entries appended at the moment of /resume:

  • a user message "Continue from where you left off." with isMeta: true
  • an assistant message "No response requested." with model: "<synthetic>"

Code Example

{"type":"user","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"Continue from where you left off."}]},"timestamp":"2026-05-20T07:48:58.602Z","sessionId":"<session-B-id>","version":"2.1.139",...}
{"type":"assistant","message":{"model":"<synthetic>","role":"assistant","content":[{"type":"text","text":"No response requested."}],"stop_reason":"stop_sequence","stop_sequence":"",...},"timestamp":"2026-05-20T07:48:58.602Z","sessionId":"<session-B-id>","version":"2.1.139",...}
RAW_BUFFERClick to expand / collapse

Description

When invoking /resume from a fresh terminal on Windows, with multiple existing sessions in the project, Claude Code renders the full transcript of a different (unselected) session into the terminal before yielding control to the actually-resumed session. The selected session's context is loaded correctly internally, but the displayed scrollback shows the wrong session's history.

Additionally, the unselected (displayed) session's .jsonl log gets two synthetic entries appended at the moment of /resume:

  • a user message "Continue from where you left off." with isMeta: true
  • an assistant message "No response requested." with model: "<synthetic>"

Steps to reproduce

  1. Have multiple Claude Code sessions in the same project (different .jsonl files in ~/.claude/projects/<project>/). I had ~25 sessions, two of them with custom titles set via /rename: Session A ("Fork-C: ...") and Session B ("Fork-G: ..."). Both were last active the previous day in different terminals.
  2. Open a fresh PowerShell terminal on Windows 11 (computer had just rebooted after a Windows update — no prior Claude Code state, no Windows Terminal scrollback persistence configured).
  3. Run claude.
  4. After the welcome banner, run /resume and select Session A.

Expected

  • Welcome banner printed once.
  • After /resume, the visible terminal shows Session A's last few messages, an empty scrollback, or just a status indicator — whichever the design intends.
  • Only Session A's .jsonl log file is modified.

Actual

  • Welcome banner is printed twice in the scrollback (the second copy appears right before the unselected session's content).
  • Session B's full transcript (~hundreds of messages from the previous day) is rendered into the terminal scrollback.
  • The /resume command issued by the user does not appear in the rendered scrollback at all — it is preceded/replaced by Session B's content.
  • Internally the resume IS correct: subsequent prompts confirm the agent is in Session A's context (memory, tasks, last conversation are all Session A's).
  • Session B's .jsonl gets two synthetic entries appended (timestamps within the same second, ~1 min after the claude invocation):
{"type":"user","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"Continue from where you left off."}]},"timestamp":"2026-05-20T07:48:58.602Z","sessionId":"<session-B-id>","version":"2.1.139",...}
{"type":"assistant","message":{"model":"<synthetic>","role":"assistant","content":[{"type":"text","text":"No response requested."}],"stop_reason":"stop_sequence","stop_sequence":"",...},"timestamp":"2026-05-20T07:48:58.602Z","sessionId":"<session-B-id>","version":"2.1.139",...}

The 2 entries do not contain ordinary content; they look like a probe/wake-up that the harness uses internally, but they end up persisted in the log.

Environment

  • Claude Code v2.1.139 (just updated from v2.1.138 — the SessionStart:startup hook printed the update notice, which is also the first time v2.1.139 ran on this machine)
  • Windows 11 Enterprise 10.0.26100
  • PowerShell 5.1 (default Windows PowerShell, not pwsh 7)
  • ~25 sessions in the project directory; Sessions A and B were the two most recently modified (yesterday).
  • Computer just rebooted (Windows update). No persisted terminal scrollback feature in use.

Impact

  • Confusion: the user sees a long transcript from one session and reasonably concludes they're in that session. Took several diagnostic exchanges and direct inspection of the .jsonl files to confirm the internal state was actually the other session.
  • Log pollution: the unselected session's .jsonl gets synthetic entries that did not originate from a real user interaction. Tools that mine these logs (analytics, transcript replay, session activity loggers) will see spurious content. The user's hooks that key off SessionEnd / activity logs may produce noise too.

Hypothesis

The /resume flow appears to be probing or pre-loading other sessions in the project for preview/listing purposes, and that pre-load:

  1. Renders one of those sessions' transcripts into the terminal output (the visual bug).
  2. Writes a synthetic Continue from where you left off. + No response requested. pair into that session's .jsonl (the data bug).

The fact that the welcome banner appears twice in the scrollback supports the idea that the UI is re-instantiating something between the initial claude invocation and the actual resume.

Note

I am happy to provide the full session log files privately if useful — they contain only software-engineering content but I'd rather not paste 20 MB of context into a public issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING