Renaming a session from the /resume picker desyncs the input-border name (disappears or shows stale value after resume)
Environment
- Claude Code v2.1.233, native install (Mach-O arm64)
- macOS (Darwin 25.5.0)
Summary
The session name shown in the input-box top border is rebuilt on resume from agent-name transcript records, while the /resume picker list reads custom-title records. The picker's rename (Ctrl+R) writes only a custom-title record and never an agent-name record, so the two displays diverge. The in-session /rename command writes both and is not affected.
Two symptoms, same root cause:
A. Name disappears entirely. If a session was only ever renamed via the picker (no agent-name record exists) and a session color is set with /color, resume rebuilds the border badge from (agentName: undefined, agentColor: "red") → {name: "", color: "red"}. The truthy color makes the badge render, the empty name makes it invisible, and the badge path shadows the normal title display. Result: red border, no name — on every resume — while /resume still lists the name correctly.
B. Border shows a stale name. If the session previously had an in-session /rename (so an agent-name record exists) and is later renamed via the picker, the border keeps showing the old agent-name value forever, while the /resume list shows the new name.
Steps to reproduce (symptom A)
- Start a session, exit.
- In the
/resumepicker, press Ctrl+R and rename the session. - Resume it, run
/color red, exit. - Resume again → border is red with no name;
/resumestill lists the name.
Steps to reproduce (symptom B)
- In a session, run
/rename old-name. - Exit; in the
/resumepicker, Ctrl+R rename it tonew-name. - Resume → border shows
old-name, picker showsnew-name.
Evidence
Transcript record sequence from one reproduction session:
custom-title 'old-name' ← in-session /rename
agent-name 'old-name' ← in-session /rename also writes this
custom-title 'new-name' ← picker rename: NO agent-name follows
agent-color 'yellow'
After resume the border shows old-name; the picker shows new-name.
Root cause (from the bundled source)
- The picker rename handler appends only
{type:"custom-title"}and updatescurrentSessionTitle; the/renamecommand additionally persists anagent-namerecord. - On resume,
standaloneAgentContextis rebuilt as{name: agentName ?? "", color: agentColor}from the agent-name/agent-color records only (Pcoin the minified bundle);customTitleis not consulted. - The border-badge hook (
tco) renders the badge whenname || coloris truthy with textname || "", so a color with an empty name produces an invisible badge that also suppresses the fallback title rendering.
Expected
The border label and the /resume list should agree: either the picker rename should also write an agent-name record, or the resume-time badge rebuild should fall back to the last custom-title when no agent-name exists.
Workaround
Run in-session /rename <name> once in the affected session — it writes both records and re-syncs the border.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗