Skip to content

Reuse Session executors through a shared Harness contract - #193

Merged
SaladDay merged 8 commits into
mainfrom
codex/session-executor-reuse-20260928
Sep 28, 2026
Merged

SaladDay merged 8 commits into
mainfrom
codex/session-executor-reuse-20260928

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

A Session now retains its native executor between Turns. Core schedules durable work through one Runtime lifecycle; Codex, Claude and MiniMax implement the same Executor/Turn contract. Healthy follow-up Turns preserve their native process and exact history.

  • Separate preparation, admission, cancellation, native settlement, resource cleanup and idle expiry. Retain cleanup ownership on uncertainty and never replay uncertain input. Temporary preparation capacity leaves durable work queued for the existing scheduler.
  • Use the common lifecycle for connected managed and self-hosted environments. Closing an executor does not reclaim its environment or delete its workspace.
  • Confirm native work has stopped before reporting cancellation. Claude distinguishes unanswered function calls from submitted results awaiting receipts. Codex terminates its thread-owned background terminals through confirmed native operations.
  • Notify the existing scheduler after input commits and record readiness, start-control and first-text timings separately. Replace the private wire/bridge contracts without compatibility paths.
  • Link the Harness onboarding guide from README, covering interfaces, registration, optional capabilities, qualification and a runnable example. Consolidating these declarations into a single onboarding entry file remains a separate task.

Validation:

  • Full make check, with the unchanged Web gate executed on mx and other gates on zju. Includes the dedicated PostgreSQL suite, generated-contract checks, 55 browser tests, Claude bridge tests and Rust checks.
  • Full adapter/Runtime tests and focused race regressions. Final independent blind review of 2064a177..fecf58da found no substantiated in-scope issue.
  • Real pinned official SDK plus raw HTTP against all three native engines: standalone baseline/candidate runs and managed Docker/self-hosted Docker placement runs. Covers normal reuse, restart/history, cancellation, continuation, Files/Artifacts and isolation. Final Codex runs verify the cancelled foreground command stops producing side effects in both placements; final Claude functions run verifies cancellation while awaiting an unanswered function.

Native versions: Codex 0.153.4, Claude SDK 0.3.269 / native 2.1.269, MiniMax 0.4.12. Versioned evidence is retained under /home/fanjingluo/.oac/acceptance/session-executor-reuse-20260928 on zju, including failed runs and final cleanup records. The earlier MiniMax managed sample contained a native duplicate tool call; the one permitted fresh-Session strict retry passed.

Timing samples prove retained ownership and avoided native preparation, not a universal response-time improvement. Queue and environment-ready durations cannot be separately derived from the standalone samples; this limit is preserved in the evidence.

@SaladDay
SaladDay marked this pull request as ready for review September 28, 2026 16:25
@SaladDay
SaladDay merged commit 73c6c0d into main Sep 28, 2026
3 checks passed
@SaladDay
SaladDay deleted the codex/session-executor-reuse-20260928 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