Session titles go stale after a mid-session pivot; set_session_title refuses to rename the current session from within
Status Open
Reported on v2.1.221
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 1 comment · opened Aug 5, 2026
What happened
Sessions are auto-titled from the first messages. When a session pivots mid-way (started as "read this thread", became "fix a bug and open a PR"), the title stays frozen on the original topic, so the session becomes hard to find in the session list later.
Asking the agent to fix the title from within the session does not work — the session-management MCP tools deliberately exclude the current session:
list_sessions: "The current session is excluded."search_session_transcripts: searches "other" sessions only.set_session_title: errors withRefusing to rename the current session from within itself.even though the id is knowable fromCLAUDE_CODE_SESSION_ID/CLAUDE_CODE_HOST_SESSION_ID.
Workaround found
Spawn a separate session (e.g. via the suggested-task chip) whose only job is to call set_session_title on the first session's id. It works, but it is a whole extra session and a user click just to rename the current one.
Suggestion (any of these would resolve it)
- Allow
set_session_titleon the current session — the title is user-facing metadata; self-rename seems low-risk compared to spawning a sibling session to do the same thing. - Or refresh the auto-title when the session's topic clearly shifts (e.g. on compaction), so titles keep matching what the session ended up being about.
- Or provide a first-class "rename this session" affordance the model can invoke.
Environment
- Claude Code 2.1.221 (desktop app, macOS), agent SDK 0.3.221
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗