chat: carry claude's own session uuid on the result event

The sidecar knew which transcript file a turn had landed in and kept it to itself —
setClaudeSession fed --resume and nothing else. A session officer started was therefore
unaddressable from the platform side. Put it on the result event so it crosses the wire.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 00:28:39 +00:00
co-authored by Claude Opus 5
parent 035a1ba8f6
commit 47d03de307
3 changed files with 17 additions and 2 deletions
+3 -1
View File
@@ -115,7 +115,9 @@ function handleResult(
callbacks.onSessionId(sessionId);
}
callbacks.onEvent({ type: 'result', cost });
// Carried on the event as well as into sidecar-local state: the callback only feeds `--resume` here,
// so without this the platform never learns which transcript file a session it started ended up in.
callbacks.onEvent({ type: 'result', cost, claudeSessionId: sessionId });
}
function handleSystem(msg: Record<string, unknown>, callbacks: StreamParserCallbacks): void {