Repository navigation
fix: supervise headless sessions with operation leases and retain Codex errors - #5248
Merged
Merged
Conversation
Trecek
force-pushed
the
impl-codex-operation-leases-20261004
branch
from
October 6, 2026 00:38
8496e05 to
ebc767d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a Codex L2 session waits for an in-flight MCP call without stdout, the idle watchdog can kill it despite active work. Operation leases now carry that activity across both backends and every supervisor watcher, deadline extension, and termination drain. Each physical attempt gets its own channel, and the L2 idle floor is at least
run_skill.timeoutwhile L1 idle settings remain separate.This implements the combined Parts A–E plan for #4640:
erroritems as nonterminal diagnostics. Retain ordered messages in normal and killed results, bound them to the first five messages of 500 characters each, and persistsession_errorsinsummary.jsonandsessions.jsonlwith session-index schema 16.The lease primitive uses existing
core/plugins/capacity and the canonical ContextVar incore/pipeline/_step_context.py. Per-attempt channel creation and spec injection live in_managed/_attempt.pyto preserve the launch module's file budget. No import, complexity, file-size, or acceptance-policy limit was waived.Validation:
task test-local-gatethrough MCPtest_check; final run: 50,760 passed, 620 skipped, 29 xfailed.Closes #4640.