{"version":"2.1.291","anchor":"relocatesessiontranscript-drops-its-lock-acquisitions-and-a","canonical_anchor":"relocatesessiontranscript-drops-its-lock-acquisitions-and-a","heading":"Session transcript files are no longer locked while they are moved or written","tier":"internal","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.291\/e\/relocatesessiontranscript-drops-its-lock-acquisitions-and-a","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.291","markdown":"### Session transcript files are no longer locked while they are moved or written\n\nClaude Code stopped taking a per-file lock on session transcripts when moving them, hydrating sessions and writing subagent transcripts\n\n**Unclear.** It is not clear whether the removed waits were real file locks, or whether equivalent protection now happens somewhere else.\n\n**What**\n\nA session transcript is the file where Claude Code records a conversation so it can be resumed later. Until this release, Claude Code took a per-file lock before moving or rewriting that file. A lock is a guard that makes other writers wait their turn instead of touching the same file at the same moment. That lock is now gone from several places:\n\n- `relocateSessionTranscript`, which moves a transcript to a new place, for example after the session changes directory. It no longer locks the destination before setting it aside, or the source before the move. A follow-up step that ran after the move (`TRn(h, S)`) was removed as well, and the move helper changed from `VRn` to `LRn`, which no longer takes the guard. The recovery path that logs `relocateSessionTranscript: could not restore set-aside destination after ENOENT move` is kept.\n\n- Remote session hydration, the step that fills in a local transcript from a remote copy, both the v1 path and the CCR v2 foreground path. The `Skipping remote hydration` and `Skipping CCR v2 foreground hydration` paths now run without the lock.\n\n- Subagent transcript writes, where a subagent (a helper agent Claude starts for part of a task) saves its own transcript. The `Subagent transcript write failed` path also runs without the lock.\n\nIn the code, each removed lock was a `using ... = await EI(path)` acquisition on the file's path.\n\n**Why**\n\nWithout the lock, two things writing the same transcript at once, such as resuming, teleporting a session or a subagent saving its transcript, are no longer made to wait for each other. The members do not say why the lock was removed. If transcripts look incomplete or out of order after moving, resuming or running subagents, this change is a place to look.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}