Renaming a session from the /resume picker desyncs the input-border name (disappears or shows stale value after resume)

Status Closed — duplicate
Maintainer reply None cached
Activity 1 comment · opened Aug 17, 2026 · closed Aug 17, 2026

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)

  1. Start a session, exit.
  2. In the /resume picker, press Ctrl+R and rename the session.
  3. Resume it, run /color red, exit.
  4. Resume again → border is red with no name; /resume still lists the name.

Steps to reproduce (symptom B)

  1. In a session, run /rename old-name.
  2. Exit; in the /resume picker, Ctrl+R rename it to new-name.
  3. Resume → border shows old-name, picker shows new-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 updates currentSessionTitle; the /rename command additionally persists an agent-name record.
  • On resume, standaloneAgentContext is rebuilt as {name: agentName ?? "", color: agentColor} from the agent-name/agent-color records only (Pco in the minified bundle); customTitle is not consulted.
  • The border-badge hook (tco) renders the badge when name || color is truthy with text name || "", 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗