Describe the bug
Sessions created through the web UI (WebSocket claude-command) are always named "Untitled Claude Session" in the sidebar. The claude-session-synchronizer.provider.ts reads display names from ~/.claude/history.jsonl via buildLookupMap(path.join(this.claudeHome, 'history.jsonl'), 'sessionId', 'display'), but history.jsonl is only written by the Claude Code CLI — not by sessions initiated through the WebSocket API. As a result, nameMap.get(sessionId) returns undefined and the fallback 'Untitled Claude Session' is stored as custom_name in the database.
To Reproduce
- Start CloudCLI UI v1.31.5 (npm install -g @cloudcli-ai/cloudcli@latest)
- Open the web UI in browser
- Select a project and start a new chat session
- Send any message (e.g., "hello")
- Wait for Claude to respond
- Observe the session name in the sidebar — it shows "Untitled Claude Session"
- Refresh the page — still "Untitled Claude Session"
Expected behavior
Sessions created via the web UI should have a meaningful display name (e.g., the first user message, similar to how the CLI writes to history.jsonl). In v1.29.x this worked correctly because sessions were read directly from JSONL files and the first user message was used as the title.
Root cause analysis
• claude-session-synchronizer.provider.ts:31 builds a name map from ~/.claude/history.jsonl
• claude-session-synchronizer.provider.ts:106 falls back to 'Untitled Claude Session' when sessionId is not in the map
• The WebSocket handler in claude-sdk.js creates sessions and writes JSONL files but never appends to history.jsonl
• Database shows 16/30 sessions as "Untitled Claude Session" — all created via UI, none present in history.jsonl
Possible fix
When a session is created or receives its first message via WebSocket (claude-command), append an entry to ~/.claude/history.jsonl with { sessionId, display: firstUserMessage }. Alternatively, update custom_name in the sessions DB directly when the first user message is received.
Desktop
• OS: macOS 15.4 (Darwin 25.4.0)
• Version: CloudCLI UI v1.31.5 (npm install)
• Node.js: v22.x
Additional context
Verified by cross-referencing the database (~/.cloudcli/auth.db sessions table) with ~/.claude/history.jsonl. All 16 "Untitled" sessions have no corresponding entry in history.jsonl. The 14 sessions with proper names all have matching entries in history.jsonl (created via CLI).
Describe the bug
Sessions created through the web UI (WebSocket claude-command) are always named "Untitled Claude Session" in the sidebar. The claude-session-synchronizer.provider.ts reads display names from ~/.claude/history.jsonl via buildLookupMap(path.join(this.claudeHome, 'history.jsonl'), 'sessionId', 'display'), but history.jsonl is only written by the Claude Code CLI — not by sessions initiated through the WebSocket API. As a result, nameMap.get(sessionId) returns undefined and the fallback 'Untitled Claude Session' is stored as custom_name in the database.
To Reproduce
Expected behavior
Sessions created via the web UI should have a meaningful display name (e.g., the first user message, similar to how the CLI writes to history.jsonl). In v1.29.x this worked correctly because sessions were read directly from JSONL files and the first user message was used as the title.
Root cause analysis
• claude-session-synchronizer.provider.ts:31 builds a name map from ~/.claude/history.jsonl
• claude-session-synchronizer.provider.ts:106 falls back to 'Untitled Claude Session' when sessionId is not in the map
• The WebSocket handler in claude-sdk.js creates sessions and writes JSONL files but never appends to history.jsonl
• Database shows 16/30 sessions as "Untitled Claude Session" — all created via UI, none present in history.jsonl
Possible fix
When a session is created or receives its first message via WebSocket (claude-command), append an entry to ~/.claude/history.jsonl with { sessionId, display: firstUserMessage }. Alternatively, update custom_name in the sessions DB directly when the first user message is received.
Desktop
• OS: macOS 15.4 (Darwin 25.4.0)
• Version: CloudCLI UI v1.31.5 (npm install)
• Node.js: v22.x
Additional context
Verified by cross-referencing the database (~/.cloudcli/auth.db sessions table) with ~/.claude/history.jsonl. All 16 "Untitled" sessions have no corresponding entry in history.jsonl. The 14 sessions with proper names all have matching entries in history.jsonl (created via CLI).