Skip to content

backend-agents D18: detach semantics — unmount ≠ abort #812

Description

@btipling

Parent: #794
Umbrella: #794
Label: backend-agents
Status: DRAFT
Blocked on: #811 (D17)

Implements one row of the restart umbrella. One issue → one PR → one adversarial review → one merge → close. Do not expand scope.

Slice

lib/detachTurn.ts decideDetach: unmount / switch / New / logout close this reader only. Never abort as "turn over". Never a server cancel.

Explicit no-op when no run id (idle). Stop/Esc still cancels. Host wiring source-lock (4 detach sites / 3 abort sites).

DoD

  • Source lock: 4 detachTurn() sites / 3 abort() sites
  • Durable run (turnRunId present) → close reader, no abort
  • Idle / no run id → no-op
  • typecheck + vitest green
  • No Wasm/protocol change

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-agentsClient-independent agent turns — backend-run, survive tab close / refreshenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions