Summary
Sessions renamed in Claude Code (via the /rename command) are not reflected in the CloudCLI sidebar. The Claude session synchronizer builds its name map only from ~/.claude/history.jsonl (which holds first-prompt-per-session entries), but /rename writes the new title into the session's own JSONL transcript instead. The rename is durable on disk, but invisible to CloudCLI — so a user juggling several parallel sessions has no way to surface their per-session labels in the UI.
Reproduce
- CloudCLI UI v1.31.5 (npm install)
- Claude Code v2.1.131
- Node v24.14.1, Ubuntu 24.04
-
Start a session in claude, send a message, then run /rename Foo.
-
grep custom-title ~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl shows the rename was persisted:
{"type":"custom-title","customTitle":"Foo","sessionId":"…"}
{"type":"agent-name","agentName":"Foo","sessionId":"…"}
-
grep "Foo" ~/.claude/history.jsonl returns nothing — /rename does not append to history.jsonl.
-
Open CloudCLI — the session shows either the first user prompt or Untitled Claude Session. Never Foo.
Root cause
server/modules/providers/list/claude/claude-session-synchronizer.provider.ts:31:
const nameMap = await buildLookupMap(
path.join(this.claudeHome, 'history.jsonl'),
'sessionId',
'display',
);
history.jsonl is a per-prompt log written by the CLI as the user types. /rename does not touch it. The actual rename lives in the session JSONL as a {"type":"custom-title", "customTitle":"…"} entry (and a redundant agent-name entry).
This is the same architectural seam called out in #731 — the synchronizer is built around history.jsonl as the only name source, and gaps appear whenever Claude Code persists a name through some other path.
Suggested fix
processSessionFile() already iterates the session JSONL. It can pick up the custom-title entry (preferring the latest one if multiple exist, since users can rename more than once) and prefer it over the history.jsonl-derived first-prompt fallback.
Suggested precedence for the displayed session name:
- CloudCLI UI rename (
sessions.custom_name in CloudCLI's SQLite) — already wins, unchanged
- NEW: Claude Code
/rename → most-recent customTitle from session JSONL
- First user prompt from
history.jsonl — current default
Untitled Claude Session
Why this matters
The renaming-many-tabs workflow is exactly what brings users to a session-management UI like CloudCLI in the first place — they have lots of parallel Claude Code sessions and they label them so they don't get lost. Today CloudCLI shows the same generic title for all of them regardless of how thoroughly the user has renamed in the CLI.
Happy to send a PR if useful.
Summary
Sessions renamed in Claude Code (via the
/renamecommand) are not reflected in the CloudCLI sidebar. The Claude session synchronizer builds its name map only from~/.claude/history.jsonl(which holds first-prompt-per-session entries), but/renamewrites the new title into the session's own JSONL transcript instead. The rename is durable on disk, but invisible to CloudCLI — so a user juggling several parallel sessions has no way to surface their per-session labels in the UI.Reproduce
Start a session in
claude, send a message, then run/rename Foo.grep custom-title ~/.claude/projects/<encoded-cwd>/<sessionId>.jsonlshows the rename was persisted:{"type":"custom-title","customTitle":"Foo","sessionId":"…"} {"type":"agent-name","agentName":"Foo","sessionId":"…"}grep "Foo" ~/.claude/history.jsonlreturns nothing —/renamedoes not append tohistory.jsonl.Open CloudCLI — the session shows either the first user prompt or
Untitled Claude Session. NeverFoo.Root cause
server/modules/providers/list/claude/claude-session-synchronizer.provider.ts:31:history.jsonlis a per-prompt log written by the CLI as the user types./renamedoes not touch it. The actual rename lives in the session JSONL as a{"type":"custom-title", "customTitle":"…"}entry (and a redundantagent-nameentry).This is the same architectural seam called out in #731 — the synchronizer is built around
history.jsonlas the only name source, and gaps appear whenever Claude Code persists a name through some other path.Suggested fix
processSessionFile()already iterates the session JSONL. It can pick up thecustom-titleentry (preferring the latest one if multiple exist, since users can rename more than once) and prefer it over thehistory.jsonl-derived first-prompt fallback.Suggested precedence for the displayed session name:
sessions.custom_namein CloudCLI's SQLite) — already wins, unchanged/rename→ most-recentcustomTitlefrom session JSONLhistory.jsonl— current defaultUntitled Claude SessionWhy this matters
The renaming-many-tabs workflow is exactly what brings users to a session-management UI like CloudCLI in the first place — they have lots of parallel Claude Code sessions and they label them so they don't get lost. Today CloudCLI shows the same generic title for all of them regardless of how thoroughly the user has renamed in the CLI.
Happy to send a PR if useful.