Skip to content

Remote lane B: a subagent's own rows in the drill-in (the subagent-rows gap lifted) - #501

Merged
SSFSKIM merged 10 commits into
masterfrom
fix/remote-subagent-rows
Nov 6, 2026
Merged

SSFSKIM merged 10 commits into
masterfrom
fix/remote-subagent-rows

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 6, 2026

Copy link
Copy Markdown
Owner

What the owner saw

On the MacBook, a lane B session spawned from MAWS and running on the Mac mini: drilling into a running subagent in the Subagents panel showed the header, the relay composer and, in place of the agent's transcript, "a subagent’s own rows aren’t carried from another machine yet". That is main's remote overlay (REMOTE_GAPS['subagent-rows'], src/main/lane-b/remote-outcomes.ts), carried over from O9's lane A gap; the drill-in builds no child source while it is closed.

What the remote path was missing

  1. The gap itself. For a running agent of a live session nothing else was missing: the agent's rows are live journal events with agentId set, which plane B carries and main's fold emits as session.eventBatch, and its slice (session.events {agentId}) crosses as a call. Proof: the new e2e case fails on master's code at the gap (run 42193080250, the drill-in reads the gap's words), and with the gap lifted alone its backfill and live-append steps passed (run 42193431624).
  2. The agent's end. This machine's rule switches an ended agent to its disk transcript (fs.agentEvents). Over the link that is one unbudgeted window (it can pass the channel's ~4 MiB answer bound), the disk follow's later lines never cross (seq: null events are dropped by stream-catchup.ts), and no fs.followState crosses either. Run 42193431624 shows the failure: at the end the drill-in said "Could not load this transcript · unknown agent". So a child of another machine's session now reads the session's stream whenever the launch's slice holds its start, its end included, and its end switches nothing. It is disk-backed only when the launch never started it (an earlier launch's agent, a session not live there). A start heard then (a resume), or heard or held while the slice is read, takes it back to the stream. A remote.gap in the session's stream reads a live child again. This machine's children are unchanged.
  3. A slice too large for one answer. readWhole answered any agentId read past the bound as history unavailable. It now pages an agent's slice of a live launch the way it pages the launch, each page naming the agent.
  4. Waits on follow states that never come. The child source's two waits on fs.followState (the agent's incomplete backfill, the parent slice still backfilling) re-ask every REMOTE_FOLLOW_POLL_MS for another machine's session. Before, the first was a 30 s stall and then an error.
  5. A disk window refused too-large. It now answers with words ("This agent’s transcript on is too large to show here yet"). The follow the machine took before refusing is tracked, so a session-wide unfollow lets go of it.

Lane A's remote gap (src/renderer/src/session/controls/lane-a.ts) is kept. Nothing under src/endpoint/ changed.

Tests

  • e2e (e2e/remote.spec.ts, last case, with SideJournal.agent borrowing subagent.jsonl's first agent): A spawns a session on B with "+ Session" and its turn starts a background agent. The drill-in shows the reply the agent gave before it opened, then a reply appended live. Once the agent ends, its work folds behind its last reply, still from the stream, with no follow of its transcript on B.
  • unit: ipc.test.tsx covers the remote provenance rule, its three hydration races, the gap re-read, the E11 host loss after an empty first slice, and the follow-state polls. remote-history.test.ts covers agent-slice paging, remote.test.ts the too-large words and follow, remote-outcomes.test.ts the overlay. lane-b.test.ts has no pin of the gap (only the list of control keys), so it is unchanged.

Review

Three rounds of doperpowers:reviewer-medium. Round 1 (on the gap lift alone) found the end, slice-size and disk-window problems (items 2, 3, 5). Round 2 found two hydration races in the new rule and the missing gap handling. Round 3 found one regression: the liveness from held batches was lost after an empty first slice (E11). Each finding was fixed with a test that reproduces it. Round 3's other finding is logged below.

Residue (not done here)

  • fs.agentEvents takes no byte budget. A remote agent read from disk whose one window passes the channel's bound gets the words above, not its transcript. That happens for an agent from an earlier launch, or of a session not live on its machine. The fix is maxBytes on fs.agentEvents behind a peer capability: Follow.snapshot already budgets windows; FsService.agentEvents drops the field.
  • Suppose an earlier launch's agent resumes while its first slice is being read. Its drill-in then shows only this launch's rows, not its earlier disk history.
  • A resume heard while a disk read of the agent is still out, followed by a gap re-read, holds the recovered stream's rows until that disk read settles or times out (round 3's follow-up).
  • A row of an agent alone past the channel's bound ends its remote slice read as history unavailable, so the agent is then read from disk. A gap whose range B's journal lost cannot be read back: if that range held the agent's end, the agent reads as working. The parent heals by status; the child does not.
  • The O7 plan still records the gap as kept (docs/doperpowers/plans/2026-10-28-p5-o7-remote-lane-b.md, near line 476). Docs were left alone per the brief.
  • A remote terminal (lane A) session's subagent is a separate path; see the hand-back.

Gates

  • static, unit, e2e:remote at ed7c6b0: run 42198471280, green, 0 flaky.
  • --gates all at the head 11b79d8: run 42200623991, in progress.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

… rows before, the next live, and its transcript from B's disk once it ends (red: the drill-in shows the subagent-rows gap)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…e link (its live rows in the session's stream, its slice as session.events by agentId, an ended one's transcript as fs.agentEvents), so the drill-in shows them

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…n a follow state (an incomplete backfill, the parent's slice still backfilling) is asked again every REMOTE_FOLLOW_POLL_MS, since no follow state crosses the link

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…s stream whenever the launch started it, its end included and switching nothing (main pages that slice; a disk window crosses as one answer, and that machine's disk follow sends nothing here); disk-backed only otherwise, and a start it hears then (a resume) takes it back to the stream

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… answer is read in pages of the launch naming the agent, past pages with none of its events; a row of it alone too large ends the read as history unavailable, telling no gap of the session's

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…s takes no byte budget) answers with its words, and the follow the machine took before refusing is this device's to let go of

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… nothing on B following its transcript; the journal builder's frame cast typechecks

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…batch's rows; a start heard or held while the slice is read keeps the child on the stream (no disk read); a gap in the session's stream reads a live child again

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…has work to fold (a reply alone folds nothing)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… over an older slice's, so a host lost after an empty first slice still ends the child as stopped (E11)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T10:13:31.907800Z 11b79d8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit c6c5a57 into master Nov 6, 2026
SSFSKIM added a commit that referenced this pull request Nov 6, 2026
…2e/remote.spec.ts keeps #501's case beside this one's)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 6, 2026
…at's machine first with the home-root rule (PR #503, DL 237); the O7 plan's subagent-rows gap marked lifted for lane B; three tracker rows

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the fix/remote-subagent-rows branch November 6, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant