[BUG] Desktop import drops the CLI session customTitle — imported sessions always show "General coding session"
Summary
Importing a CLI session into Claude Desktop — via /desktop in the CLI, or claude://resume?session=<uuid> — discards the session's explicitly-set title. Desktop always displays "General coding session", even when the CLI session has a customTitle set via --name or /rename.
Environment
- Claude Code CLI
2.1.176(macOS, arm64) - Claude Desktop (macOS)
- Auth: claude.ai subscription (
authMethod: "claude.ai")
Steps to reproduce
- Create a session with an explicit name:
claude -p --name "my-pipeline · issue 42" --session-id <uuid> ...
(or set it mid-session with /rename)
- Confirm the title is stored CLI-side — the transcript at
~/.claude/projects/<project-slug>/<uuid>.jsonl contains a record of
"type": "custom-title" with "customTitle": "my-pipeline · issue 42"
(and a matching agentName).
- Resume that session in the CLI and run
/desktop.
Expected: Desktop shows my-pipeline · issue 42.
Actual: Desktop shows General coding session.
Evidence — the title is never imported
The Desktop-side record written on import, at~/Library/Application Support/Claude/claude-code-sessions/<account>/<org>/local_<cliSessionId>.json,
has no title field of any kind:
{
"sessionId": "local_<cliSessionId>",
"cliSessionId": "<cliSessionId>",
"cwd": "/path/to/worktree",
"originCwd": "/path/to/worktree",
"lastFocusedAt": 1785556683574,
"createdAt": 1785555654169,
"lastActivityAt": 1785555654169,
"isArchived": false,
"permissionMode": "default",
"remoteMcpServersConfig": [ ... ],
"alwaysAllowedReasons": [],
"sessionPermissionUpdates": []
}
customTitle exists in the CLI transcript but has no corresponding key here, so Desktop has nothing to display and falls back to the generic default.
Impact
We run headless planning sessions from an automation pipeline and name each one after its work item (<pipeline> · <client> · issue <n>) precisely so a reviewer can tell them apart. Opening them in Desktop is the intended review path, but every session shows as "General coding session" and they're indistinguishable in the sidebar.
Workarounds that do not help:
/rename <title>immediately before/desktop— the title is dropped at import, not at rename.- Passing a title to
/desktop— the command takes no arguments, and there is no--desktopCLI flag.
The only recourse is renaming each session by hand in the Desktop toolbar, which defeats the point of naming them programmatically.
Suggested fix
Carry customTitle through importCliSession into the local_<cliSessionId>.json record and use it as the Desktop session's display title, falling back to the generated title only when unset.
Related
- #80773 — same import path; its reproduction also observes the "General coding session" title, though that issue is about duplicate tabs / the inability to focus an existing native session.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗