Auto-injected "Continue from where you left off." is parented to the stale last-prompt leaf, silently orphaning every message that follows
Preflight Checklist
- [x] I have searched existing issues. Closest matches: #81868 and #65969 (same
isMeta"Continue from where you left off." auto-injection, but they cover silent background adoption and/resumelockout), #89265 (the continuation is answered with "No response requested."). None covers the misparenting described below. - [x] This is a single bug report (one causal chain, evidenced from one session transcript)
- [x] Claude Code 2.1.245 (VS Code extension), also reproduced in transcripts written by 2.1.246
Environment
- Claude Code 2.1.245, VS Code extension (
entrypoint: claude-vscode), Linux - Several concurrent sessions open in one project
- Default settings; no
CLAUDE_CODE_RESUME_INTERRUPTED_TURNoverride
What's Wrong?
The auto-injected isMeta continuation turn ("Continue from where you left off.") is written with parentUuid pointing at the uuid recorded in the preceding last-prompt entry, not at the conversation's actual last message. Everything the session does afterwards descends from that misparented node, so it is off the chain that /resume reconstructs.
The result is silent data loss from the user's point of view: ~6 hours and 355 records of work were on disk but invisible in the resume picker, in the picker preview, and in the resumed session itself. The user only noticed because he knew a specific string had been written in a conversation and could not find it in any session he opened.
Evidence
From one session transcript (~/.claude/projects/<project>/d55de230-….jsonl, timestamps UTC, line numbers as written):
line 294 attachment bbf13f1b-c7f8-4b28-83b8-36d5ff6341fb 15:40:42.921Z
line 295 last-prompt {"leafUuid":"bbf13f1b-c7f8-4b28-83b8-36d5ff6341fb", …}
line 299 assistant 7c0d2a63 15:40:45.128Z <- actual tip
…
line 303 user fa9254a4-ad6a-4073-b340-0b2ffd5d1cb7 17:25:36.471Z
{"isMeta":true,"userType":"external",
"parentUuid":"bbf13f1b-c7f8-4b28-83b8-36d5ff6341fb", <- stale last-prompt leaf
"message":{"content":[{"type":"text","text":"Continue from where you left off."}]}}
The continuation fires ~1h45m after the tip and attaches to bbf13f1b (the last-prompt leaf) instead of 7c0d2a63 (the assistant message written 3 seconds after it).
Consequences in the same file:
- All 355 records from
17:25:36Zto23:19:37Zdescend fromfa9254a4and are off the live chain. - The session's next activity,
cac44116at2026-08-26T02:17:43.322Z, hasparentUuid: 7c0d2a63— it re-attaches to the old tip and skips the entire branch. - Live chain: 231 of 596 records, jumping straight from
15:40:45Zto02:17:43Z.
The user did not rewind, fork, or /clear; the continuation was auto-generated (isMeta: true).
Scanning all 25 session files in this project for the continuation text:
| session | occurrences | off-chain |
|---|---|---|
| d55de230 | 4 | 3 |
| 2bba5a13 | 1 | 1 |
| 11ab8a04 | 1 | 0 |
| 8d8f48e1 | 1 | 0 |
| e0b5cbe3 | 1 | 0 |
So it parents correctly most of the time, which is probably why this has gone unnoticed — the failure is silent and only visible by walking parentUuid chains in the .jsonl.
Expected
The continuation turn attaches to the conversation's current tip, so work done after it stays on the resumable chain.
Suggested mitigations
- Parent the continuation to the last written message rather than to the recorded
last-promptleaf. - Defensively: when loading a transcript, if records exist that are not reachable from the resolved leaf, surface them (or offer to reattach) rather than silently dropping them.