Implementation Plan: Eliminate Silent Discard of stream_idle_timeout_ms in Codex Builders#4076
Merged
Trecek merged 3 commits intoJun 11, 2026
Conversation
…le kill Add process_idle_timeout_ms: int = 0 field to CmdSpec, wire it through both Codex builder methods (build_skill_session_cmd, build_food_truck_cmd), and add a take-minimum override path in _headless_execute.py so the existing _watch_stdout_idle coroutine respects the spec-carried value. This eliminates the silent noqa: F841 discard of stream_idle_timeout_ms in the Codex backend (Claude Code already enforced it via the CLAUDE_STREAM_IDLE_TIMEOUT_MS env var). Codex sessions now get equivalent idle-kill protection: when spec.process_idle_timeout_ms > 0 and is smaller than the caller's effective_idle, the spec value wins. Tests cover: - CmdSpec field roundtrip and exhaustive field set - Codex builder population for both skill session and food truck paths - Cross-backend default-zero assertion for ClaudeCodeBackend - Discard disposition documentation class (TestCodexDiscardDispositions) - Headless executor override semantics (None, smaller, zero)
- Add execution/test_headless_execute.py to LAYER_CASCADE_CONSERVATIVE['pipeline'] in tests/_test_filter.py (uses minimal_ctx fixture which imports pipeline) - Bump _headless_execute.py budget from 610 to 616 lines (4 new lines for spec-based idle override logic) - Bump codex.py exemption from 1045 to 1060 lines (8 new lines for process_idle_timeout_ms wiring through both CmdSpec constructors) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cade guard The new test file uses minimal_ctx fixture which imports autoskillit.pipeline at call time but not at AST-import level — requires exemption in the arch guard's _FIXTURE_MEDIATED_ENTRIES dict. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72db6a0 to
2e8e014
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.
Summary
Add a
process_idle_timeout_ms: int = 0field to theCmdSpecfrozen dataclass, wire it through both Codex builder methods (build_skill_session_cmdandbuild_food_truck_cmd), and add an override path in_headless_execute.pyso the existing idle watchdog respects the CmdSpec-carried value. This eliminates the silentnoqa: F841discard ofstream_idle_timeout_msin the Codex backend, making stuck Codex sessions killable by the existing_watch_stdout_idlecoroutine.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260611-142225-008330/.autoskillit/temp/make-plan/t5_p1_a6_wp1_eliminate_silent_discard_plan_2026-06-11_143500.mdCloses #4003
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown