Conversation
The Codex Responses stream paths (_run_codex_stream and _run_codex_create_stream_fallback) never called _touch_activity(), leaving the cron inactivity tracker stale at "starting API call #N" even while stream events were actively flowing. This caused cron jobs to be killed by the inactivity timeout during long Codex responses. Add _touch_activity() calls on stream entry, text deltas, reasoning deltas, and in the fallback stream loop. Fixes NousResearch#7794 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Supportive +1 — this is a useful fix for the Codex cron timeout family. Even though our most recent incident looked more like a post-stream/finalization wedge than an active-stream inactivity timeout, keeping Small elegance suggestions, non-blocking:
Overall: I think this is worth landing as part of the broader Codex cron reliability work. |
|
Thanks for the focused Codex cron-reliability fix. This is an automated hermes-sweeper review; the requested behavior is already on
|
Summary
_touch_activity()calls in_run_codex_stream()and_run_codex_create_stream_fallback()so the cron inactivity tracker stays fresh during active Codex Responses streaming.Fixes #7794
Test plan
test_codex_stream_updates_activity_tracker— verifies_last_activity_tsand_last_activity_descare updated during streamtest_codex_fallback_stream_updates_activity_tracker— same for the create(stream=True) fallback path🤖 Generated with Claude Code