resolve live sessions by claude's id, not the agent's session key

Every live row read 'Starting…' and linked nowhere, because the title lookup searched for a transcript
named after the session KEY. It isn't. The key is officer's handle for a conversation; the transcript is
named after Claude's own session id, and the mapping between them exists only inside the agent
(setClaudeSession/getClaudeSession). I assumed the two were the same and never checked — confirmed wrong
by looking for the ids from the officer log under ~/.claude/projects and finding nothing.

claude:list now reports claudeSessionId beside the key, the route resolves titles by that, and rows link
to it. Null means the first turn has not reported one yet, which is a genuinely unwritten conversation
and stays unlinked.

Needs the agent sidecar restarted to take effect — the new field comes from there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-10 01:23:14 +01:00
co-authored by Claude Opus 5
parent 27bbbaee47
commit 5a7591124a
5 changed files with 29 additions and 10 deletions
@@ -40,16 +40,16 @@ export const LiveSessions = () => {
return (
<DataList>
{live.map((session) => {
// No title means no transcript on disk yet — a conversation whose first turn has not landed. It
// is shown but not linked: a row that navigates to a session you cannot open is worse than one
// that plainly isn't a link.
const isDraft = session.title === null;
// The route opens Claude's id, not the agent's session key — they are different things and only
// the agent holds the mapping. No id yet means a conversation whose first turn has not landed:
// shown, but deliberately not a link, since there is nothing to open.
const transcriptId = session.claudeSessionId;
return (
<DataRow
key={session.sessionKey}
to={isDraft ? undefined : chatSessionPath(session.sessionKey)}
selected={session.sessionKey === sessionId}
to={transcriptId ? chatSessionPath(transcriptId) : undefined}
selected={transcriptId === sessionId}
title={session.title ?? 'Starting…'}
meta={[
session.isGenerating ? (
@@ -10,6 +10,11 @@ import { useAuth } from 'hooks/useAuth';
*/
export type LiveSession = {
sessionKey: string;
/**
* Claude's own id, which is what `/chat/:sessionId` opens — distinct from `sessionKey`, officer's
* handle for the same conversation. Null before the first turn has reported one.
*/
claudeSessionId: string | null;
isGenerating: boolean;
/** Background tasks started but not yet notified — `run_in_background`, Monitor, and friends. */
pendingTasks: number;