Skip to content

fix(coding-agent): keep snapshot catch-up failures isolated #11

Description

@rynfar

Problem

The daemon can reuse a positional snapshot ID (session-generation-event cursor) after snapshot bytes change. Catch-up then detects different bytes under the same ID, closes the worker control channel, and aborts every resident session.

This has recurred in the Pylon-installed fork under large transcripts and high RLM child-update fan-in. Prime upstream issue PrimeIntellect-ai#1229 described the same invariant but closed without a fix.

Required outcome

  • Snapshot transfer identity uniquely identifies immutable bytes while event cursors keep their ordering meaning.
  • A bad snapshot generation is retired and retried without recycling an otherwise healthy worker.
  • Worker recovery waits before session reuse and preserves session ownership.
  • Child snapshot fan-in is reduced without dropping terminal child state.
  • Regression tests cover same-cursor byte changes, mismatch isolation, worker liveness, and recovery.

Compatibility

Keep the existing daemon protocol backward-compatible unless a capability-gated change is required. Preserve stock Prime behavior outside the Pylon integration boundary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions