Skip to content

bug(debug): a bundle picks the proxy run by conversation key, so it can bundle another pane's resumed run #1405

Description

@Juliusolsson05

Found by review a of #1399. This predates #1399.

Sequence (both providers)

  1. Pane p1 starts a fresh conversation T, and its proxy run is C/shell-p1/R1. p1 exits but stays visible.
  2. Another pane p2 resumes T and writes C/resume-T/R2.
  3. 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.

Activity

  1. added
    bugSomething isn't working
    type:bugSomething works wrong
    class:C2-identityIdentity/ownership across reload, replace, restore, wake
    on Sep 27, 2026
  2. Juliusolsson05 commented on Sep 27, 2026

    @Juliusolsson05
    OwnerAuthor

    Triage (W2): this overlaps W1's open #1399 (fix/codex-bundle-latest-body). #1399 rewrites the same proxy-key selection in assembleAndSaveDebugBundle (saveDebugBundle.ts) that this fix must change, so working it in parallel would conflict. It fits best as W1's follow-up to #1399, or it can be worked once #1399 merges.

  3. Juliusolsson05 commented on Sep 27, 2026

    @Juliusolsson05
    OwnerAuthor

    Context from the closed #1399 (the fallback-order attempt for #1336): review a proved that any order over resume-<conversation> / shell-<pane> bundles the wrong run in some real two-pane sequence (see the comment on #1336). That makes this issue, a launch-time run identity, the prerequisite for #1336's app half. #1399's bundle tests and manifest fields can be reused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclass:C2-identityIdentity/ownership across reload, replace, restore, wakesev:P3Minortype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions