Found by review a of #1399. This predates #1399.
Sequence (both providers)
- Pane
p1 starts a fresh conversation T, and its proxy run is C/shell-p1/R1. p1 exits but stays visible.
- Another pane
p2 resumes T and writes C/resume-T/R2.
- Save Debug Logs on
p1.
The bundle asks for resume-T (because p1's providerSessionId is T), gets match: 'exact', and bundles R2, which is p2's traffic and prompt. The manifest names R2 honestly, but the bundle says sessionId: p1.
Why
- The reader's "exact" is a segment-name match.
proxyEventsReader matches a segment directory by name and takes its newest run. That proves neither pane nor process provenance.
resume-<id> names a conversation, not a pane. Only shell-<sessionId> is pane-keyed.
session-meta.json cannot tell them apart. It holds {createdAt, cwd, sessionKey} and no owning pane.
Direction
Record the launch-time proxy session key, resume-X or shell-Y, as each process actually chose it:
- have the spawn result report it, and persist it on the pane's meta;
- have the bundle ask for exactly that key.
Optionally also stamp the owning local session id into session-meta.json (the Claude package and Codex's allocateProxyEventsFile), so the reader can verify ownership.
It touches sessionManager spawn, both provider sessions, session meta and saveDebugBundle. A two-pane regression test belongs at the assembler/reader seam.
Found by review a of #1399. This predates #1399.
Sequence (both providers)
p1starts a fresh conversationT, and its proxy run isC/shell-p1/R1.p1exits but stays visible.p2resumesTand writesC/resume-T/R2.p1.The bundle asks for
resume-T(becausep1'sproviderSessionIdisT), getsmatch: 'exact', and bundlesR2, which isp2's traffic and prompt. The manifest namesR2honestly, but the bundle sayssessionId: p1.Why
proxyEventsReadermatches a segment directory by name and takes its newest run. That proves neither pane nor process provenance.resume-<id>names a conversation, not a pane. Onlyshell-<sessionId>is pane-keyed.session-meta.jsoncannot tell them apart. It holds{createdAt, cwd, sessionKey}and no owning pane.Direction
Record the launch-time proxy session key,
resume-Xorshell-Y, as each process actually chose it:Optionally also stamp the owning local session id into
session-meta.json(the Claude package and Codex'sallocateProxyEventsFile), so the reader can verify ownership.It touches
sessionManagerspawn, both provider sessions, session meta andsaveDebugBundle. A two-pane regression test belongs at the assembler/reader seam.