Skip to content

Start suspended Session recovery promptly after committed input - #41

Merged
SaladDay merged 2 commits into
mainfrom
codex/runtime-wake-hint
Sep 23, 2026
Merged

SaladDay merged 2 commits into
mainfrom
codex/runtime-wake-hint

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

A committed next-Turn input for an initialized, suspended managed Session could wait for the next five-second lifecycle scan before restore started. A best-effort hint now lets the existing maintenance loop observe eligible pending work sooner.

Keep the normal ticker, lifecycle gate, cursor, 32-allocation page bound, ownership fences and restore state machine. Coalesce hints and permit at most one extra scan per normal cycle, including under repeated pending-request retries. Running work, initial creation, terminal receipts and file operations keep their existing scheduling. The contributor guide documents the boundary.

The container acceptance wrapper also forwards the existing daemon URL supplied by the official-client fixture, matching direct-binary acceptance. The baseline wrapper omitted it, leaving execution disabled for required initial-input cases. Production enablement and container isolation are unchanged.

Validation:

  • Deterministic cadence, simultaneous triggers, in-scan arrivals, cancellation and continuous-notification tests; race detector and repeated runs.
  • Real PostgreSQL admission tests for committed input, same-key retry, rejected/conflicting requests and ordinary running work; existing recovery, no-replay, ownership and fairness regressions.
  • Three paired real Core/Codex/KVM and Kimi K3 samples: request-to-Turn-start resume 3.717→2.916 s, 7.054→2.482 s, 5.996→2.481 s. All six samples preserve Session/history/files/configuration, initialize once, release source VM memory, restore the exact snapshot generation and clean up. Cold start remains about 19 seconds.

These observations are not a latency SLA. Idle cadence is unchanged; under sustained eligible hints there is at most one extra bounded maintenance scan per normal cycle, plus up to two best-effort eligibility reads per pending submission. No CPU-percentage reduction is claimed.

Full make check (76 Web cases), both required CI workflows including official-client/container acceptance, and fresh independent blind review passed on the final head. Design and acceptance record.

@SaladDay
SaladDay marked this pull request as ready for review September 23, 2026 04:42
@SaladDay
SaladDay merged commit 7fd3346 into main Sep 23, 2026
3 checks passed
@SaladDay
SaladDay deleted the codex/runtime-wake-hint branch October 7, 2026 06:38
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