Skip to content

Implementation Plan: Eliminate Silent Discard of stream_idle_timeout_ms in Codex Builders#4076

Merged
Trecek merged 3 commits into
developfrom
t5-p1-a6-wp1-eliminate-the-silent-discard-of-stream-idle-tim/4003
Jun 11, 2026
Merged

Implementation Plan: Eliminate Silent Discard of stream_idle_timeout_ms in Codex Builders#4076
Trecek merged 3 commits into
developfrom
t5-p1-a6-wp1-eliminate-the-silent-discard-of-stream-idle-tim/4003

Conversation

@Trecek

@Trecek Trecek commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a process_idle_timeout_ms: int = 0 field to the CmdSpec frozen dataclass, wire it through both Codex builder methods (build_skill_session_cmd and build_food_truck_cmd), and add an override path in _headless_execute.py so the existing idle watchdog respects the CmdSpec-carried value. This eliminates the silent noqa: F841 discard of stream_idle_timeout_ms in the Codex backend, making stuck Codex sessions killable by the existing _watch_stdout_idle coroutine.

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.md

Closes #4003

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 83 28.7k 1.5M 115.0k 57 100.9k 13m 19s
verify* sonnet 1 62 18.6k 324.1k 74.1k 21 53.2k 8m 21s
implement* MiniMax-M3 1 2.2M 11.7k 0 0 67 0 6m 37s
fix* sonnet 1 190 10.7k 1.7M 98.2k 63 77.3k 8m 12s
audit_impl* sonnet 1 52 8.2k 207.1k 42.1k 15 31.0k 4m 58s
prepare_pr* MiniMax-M3 1 197.8k 3.0k 0 0 12 0 1m 2s
compose_pr* MiniMax-M3 1 251.0k 1.8k 0 0 15 0 49s
review_pr* sonnet 1 190 39.0k 1.3M 92.8k 58 72.9k 9m 45s
resolve_review* sonnet 1 149 7.2k 904.3k 62.0k 39 41.5k 4m 3s
Total 2.7M 128.7k 6.0M 115.0k 376.8k 57m 10s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 217 0.0 0.0 53.9
fix 12 145016.6 6439.9 890.7
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 0
Total 229 26171.4 1645.4 561.9

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 83 28.7k 1.5M 100.9k 13m 19s
sonnet 5 643 83.6k 4.5M 275.9k 35m 21s
MiniMax-M3 3 2.7M 16.4k 0 0 8m 29s

Trecek and others added 3 commits June 11, 2026 15:28
…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>
@Trecek Trecek force-pushed the t5-p1-a6-wp1-eliminate-the-silent-discard-of-stream-idle-tim/4003 branch from 72db6a0 to 2e8e014 Compare June 11, 2026 22:28
@Trecek Trecek added this pull request to the merge queue Jun 11, 2026
Merged via the queue into develop with commit 7f63bc3 Jun 11, 2026
3 checks passed
@Trecek Trecek deleted the t5-p1-a6-wp1-eliminate-the-silent-discard-of-stream-idle-tim/4003 branch June 11, 2026 22:40
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