Skip to content

fix: restore persisted operator sessions after engine cache eviction #856

Closed

Description

@joshrotenberg

Problem

Custode persists compatible active operator conversation handles and seeds them when a provider process starts. Hot operator delivery passes only the arc and session mode. After 32 fresh scheduled/inbox arcs, the engines can evict the operator handle from their bounded cache, so the next operator message starts fresh despite Custode retaining a valid handle. A cold restart would restore that same handle.

The upstream prerequisite is released and verified on Hex and in tagged source:

Both engines accept resume_session_id: for a resume delivery without a fork. Admission occurs when the turn is delivered. A different live handle is refused; a supplied handle cannot redirect an answer away from its pending question's arc. LRU bounds remain unchanged.

Bounded implementation

  1. Adopt the released dependency versions through the ordinary lockfile update.
  2. Supply the exact persisted native handle for a compatible operator resume at the shared delivery boundary. Respect existing host/workspace/provider/configuration compatibility and rotation decisions. Do not send an old handle with fresh/fresh-fallback/fork requests.
  3. Preserve queued-answer ownership from fix: preserve the question arc when replaying queued operator answers #853; a resume handle must not turn an answer into a new operator conversation.
  4. Handle explicit admission conflicts without silently overwriting a live handle, losing the durable operator message, or replaying an effectful prompt into a fresh session.

Acceptance

  • Deterministic controlled engine tests on both providers: establish an operator handle, finish 32 fresh sweep arcs, then send another operator message and assert the original native handle is resumed.
  • Hot and cold paths agree on the selected compatible handle.
  • Conflicting live handle, stale/rotated/configuration-incompatible handle, fresh delivery and pending-question cases retain explicit safe outcomes.
  • Correlation IDs, durable queue behavior and restart reconciliation remain intact.
  • No paid native runs needed for the initial regression; use controlled enqueue/result fixtures.

Keep missing-transcript classification separate: genagent/oban_claude#175 and genagent/oban_codex#52 remain open pending versioned CLI fixtures. This change does not establish safe automatic replay after an ambiguous provider failure.

Related: #853, #855. This is a current-runtime continuity fix, not a kernel or GenAgent adoption prerequisite.

Activity

  1. added
    p2Standard queue
    area/fleetRoutines, scheduler, sensors, turns, provider availability
    on Oct 9, 2026
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

    area/fleetRoutines, scheduler, sensors, turns, provider availabilityp2Standard queuestatus/in-progressClaimed: a draft PR states the plan

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions