Under the hood
Session auto-naming logic reworked to avoid races when multiple resume/restore operations happen at once
What
When Claude Code automatically names a session and the session's id changes mid-conversation, the logic that decides whether to adopt the new derived name has been reworked:
- It now tracks an
adoptionscounter - It can set aside a previously-registered name and restore it later (
setAsideRegisteredName/restoreSetAsideName) - It passes a new
givenAtLaunchflag when registering a session name
This is meant to prevent multiple concurrent resume/restore operations from overwriting each other's session name.
Why
Without this, running multiple resume or restore operations on overlapping sessions could cause the wrong auto-generated name to stick, or a session's intended name to get lost.