Research active-turn reattachment for Pi RPC #3

Closed
opened 2026-08-22 22:21:16 -04:00 by jb · 1 comment
Owner

Part of #1

Question

Can Paseo preserve an in-flight Pi RPC turn across a daemon crash, and what mechanism would make that possible? Establish Pi RPC process and session ownership, stdin/stdout reconnect limits, event replay or buffering capabilities, and which state must survive outside the daemon. Distinguish direct reattachment from resuming the persisted conversation after losing the active turn.

Part of #1 ## Question Can Paseo preserve an in-flight Pi RPC turn across a daemon crash, and what mechanism would make that possible? Establish Pi RPC process and session ownership, stdin/stdout reconnect limits, event replay or buffering capabilities, and which state must survive outside the daemon. Distinguish direct reattachment from resuming the persisted conversation after losing the active turn.
jb added the wayfinder:research label 2026-08-22 22:21:16 -04:00
jb self-assigned this 2026-08-22 22:22:04 -04:00
Author
Owner

Resolution

Direct reattachment to an existing pi --mode rpc process is unsupported. Pi has one stdin/stdout owner, no attach endpoint, and no replay or acknowledgment protocol; native --session resume restores completed conversation history but cannot continue an in-flight provider request or tool execution.

Preserving an active turn across a Paseo daemon crash therefore requires a supervisor-owned reconnectable bridge that:

  • keeps Pi and both pipe directions alive while the daemon is absent;
  • sequences and buffers every Pi frame with cursor-based replay and acknowledgments;
  • fences command writers and daemon generations;
  • persists bridge identity separately from Pi's native session handle;
  • preserves active turn identity and pending extension UI requests;
  • distinguishes daemon disconnect from explicit close/archive; and
  • reports Pi or supervisor loss once as turn failure before allowing native conversation resume.

Research asset: Pi active-turn reattachment
Branch: research/pi-active-turn-reattachment
Commit: 30e7127aed0fbbd987e12fbe41a9238a93ebd1af

## Resolution Direct reattachment to an existing `pi --mode rpc` process is unsupported. Pi has one stdin/stdout owner, no attach endpoint, and no replay or acknowledgment protocol; native `--session` resume restores completed conversation history but cannot continue an in-flight provider request or tool execution. Preserving an active turn across a Paseo daemon crash therefore requires a supervisor-owned reconnectable bridge that: - keeps Pi and both pipe directions alive while the daemon is absent; - sequences and buffers every Pi frame with cursor-based replay and acknowledgments; - fences command writers and daemon generations; - persists bridge identity separately from Pi's native session handle; - preserves active turn identity and pending extension UI requests; - distinguishes daemon disconnect from explicit close/archive; and - reports Pi or supervisor loss once as turn failure before allowing native conversation resume. Research asset: [Pi active-turn reattachment](https://git.jb.codes/jb/paseo/src/branch/research/pi-active-turn-reattachment/goals/research/pi-active-turn-reattachment.md) Branch: `research/pi-active-turn-reattachment` Commit: `30e7127aed0fbbd987e12fbe41a9238a93ebd1af`
jb closed this issue 2026-08-22 22:37:26 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jb/paseo#3