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
+7
View File
@@ -115,6 +115,12 @@ export type ServerMessage =
type: 'result';
sessionId: string;
cost: MessageCost;
// Claude's OWN session uuid — the name of the transcript file under ~/.claude/projects/<slug>/.
// Distinct from `sessionId`, which is the key officer made up. Until this crossed the wire the
// platform had no way to address a session it had started: the mapping was captured inside the
// sidecar (claude-manager's setClaudeSession) and never left it. Absent if the harness didn't
// report one.
claudeSessionId?: string;
}
| {
type: 'sync:messages';
@@ -177,6 +183,7 @@ export type ChatEvent =
| {
type: 'result';
cost: MessageCost;
claudeSessionId?: string;
}
| { type: 'error'; message: string }
| { type: 'stopped' }