happy5318
56ee7d6f09
fix(compression): classify a Codex stream-guard stall as a timeout, not a terminal network failure ( #124077 )
...
## Thinking Path
When the Codex auxiliary stream guard aborts a compaction summary mid-stream
it raises `TimeoutError("Codex auxiliary Responses stream stalled: no new
output for 60.0s ...")`. The message contains neither "timeout" nor
"timed out", so `_classify_summary_failure` returned `timeout=False` while
`_is_connection_error` (which matches the type name "Timeout") returned
`streaming_closed=True`. The terminal network-failure flag then armed an
unconditional abort (`_TERMINAL_SUMMARY_FAILURES`), bypassing the retry
ladder and the deterministic fallback summary — on turn-start preflight
compression that ends in "Auto-resetting session after compression
exhaustion", wiping the session.
### What Changed
`agent/context_compressor.py` `_classify_summary_failure`:
- `timeout` is now computed first, and additionally matches `isinstance(e,
TimeoutError)` and the "stalled" message shape (the actual text the Codex
guard emits).
- `streaming_closed` is `_is_connection_error(e) and not timeout` — a
timeout keeps its retry-ladder semantics and can never arm the terminal
network-failure abort.
### Tests
New `TestSummaryFailureClassification124077` in
`tests/agent/test_context_compressor.py`:
- classify: Codex stall → `timeout=True, streaming_closed=False`.
- classify: plain `ConnectionError` stays `streaming_closed=True` (no
regression on the premature-close class).
- classify: a "timed out" message on a non-TimeoutError type stays a
timeout and is excluded from `streaming_closed`.
- integration: the stalled-summary path in `_generate_summary` does NOT arm
`_last_summary_network_failure`.
### Verification
- RED/GREEN double proof via git stash: pre-fix 3 failed, post-fix 4/4 pass.
- Regression: 15 existing failure-classification tests pass
(network_failure / premature_stream / empty_content / auth / truncation).
- ruff clean on changed files.
### Notes
Local test env: this checkout's venv python is a symlink into
`<home>/hermes-agent/.hermes-runtime/...`, so stdlib `zoneinfo` first-import
and pydantic's plugin `distributions()` scan under the real-home IO guard
needed the collection-time warmups at the top of the test file. CI
interpreters are not symlinked into the home — those two warm-up blocks are
no-ops there.
## Related
#124077 (issue). Family: #124078 (the same stall's template trigger),
#108104 (`auxiliary.compression.no_progress_timeout`).
(cherry picked from commit c5399fbdee44f2db1172f22632cbf348a2c7cab5)
(cherry picked from commit bce26a99791c09911d8a008a1922c512f5c1fcea)
2026-09-27 18:19:07 +05:30
..
2026-09-26 23:49:25 +05:30
2026-09-26 22:21:47 +05:30
2026-09-21 15:09:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:40:08 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 23:37:27 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:26:32 +05:30
2026-09-24 22:26:32 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:29:32 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 19:51:34 -04:00
2026-09-23 07:02:44 -04:00
2026-09-27 02:02:41 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-25 21:27:06 +05:30
2026-09-26 19:27:41 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 15:26:34 -04:00
2026-09-24 22:26:32 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-25 21:27:06 +05:30
2026-09-23 03:15:26 -07:00
2026-09-22 01:19:12 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 15:13:16 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-27 00:38:34 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 15:00:46 -05:00
2026-09-23 07:02:44 -04:00
2026-09-26 07:14:26 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:26:32 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-27 02:02:41 +05:30
2026-09-21 19:18:15 -04:00
2026-09-24 13:13:35 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-25 21:27:06 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 15:58:19 +05:30
2026-09-25 21:27:06 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-21 19:18:15 -04:00
2026-09-23 18:52:49 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 17:06:48 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 23:06:15 +05:30
2026-09-24 06:08:20 -04:00
2026-09-24 03:48:31 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 23:06:15 +05:30
2026-09-23 00:25:29 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 23:06:15 +05:30
2026-09-23 03:15:26 -07:00
2026-09-26 23:49:25 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 23:06:15 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 23:06:15 +05:30
2026-09-23 03:15:26 -07:00
2026-09-24 15:21:54 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-22 13:38:25 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 06:54:56 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 18:19:07 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-26 18:00:17 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:26:11 +05:30
2026-09-24 22:32:05 +05:30
2026-09-24 11:57:56 -05:00
2026-09-23 07:02:44 -04:00
2026-09-26 11:22:06 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-24 15:44:48 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 06:21:50 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 15:44:48 +05:30
2026-09-23 07:02:44 -04:00
2026-09-26 17:59:52 -05:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-27 00:48:22 +05:30
2026-09-25 21:28:32 +05:30
2026-09-23 07:50:12 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-27 00:04:22 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 00:04:22 +05:30
2026-09-25 14:08:03 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:27:18 +05:30
2026-09-24 15:44:26 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 15:44:18 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:36:08 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 04:38:27 -07:00
2026-09-27 00:33:45 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-25 12:56:32 -04:00
2026-09-23 13:40:45 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 22:42:14 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 15:26:34 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:05:30 -04:00
2026-09-23 07:02:44 -04:00
2026-09-27 04:59:47 -04:00
2026-09-24 21:26:28 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 22:45:56 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 10:34:54 -07:00
2026-09-23 07:02:44 -04:00
2026-09-27 00:34:15 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 18:01:46 +05:30
2026-09-24 18:01:46 +05:30
2026-09-23 10:40:39 -07:00
2026-09-25 01:08:23 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 19:31:36 -04:00
2026-09-22 15:55:09 +05:30
2026-09-23 05:41:31 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 02:03:59 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 01:06:32 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 15:44:26 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 18:01:21 +05:30
2026-09-23 05:36:34 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 21:28:38 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-25 21:27:06 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-26 19:27:41 +05:30
2026-09-23 03:15:26 -07:00
2026-09-25 12:07:32 -05:00
2026-09-23 03:15:26 -07:00
2026-09-24 15:58:19 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 01:55:21 +05:30
2026-09-23 07:02:44 -04:00
2026-09-22 02:01:39 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:34:54 -07:00
2026-09-24 22:27:18 +05:30
2026-09-26 06:10:53 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-21 23:38:16 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 22:37:10 +05:30
2026-09-23 11:41:01 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-26 23:49:25 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 19:18:15 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 05:36:34 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 18:01:21 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-21 15:07:39 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 21:28:38 +05:30
2026-09-26 23:45:36 +05:30
2026-09-23 11:41:01 -04:00
2026-09-23 07:02:44 -04:00
2026-09-25 21:27:06 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-27 00:19:50 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-25 21:28:32 +05:30
2026-09-23 21:28:38 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:43:29 -04:00
2026-09-23 07:43:29 -04:00
2026-09-23 06:31:43 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-24 01:06:16 -04:00
2026-09-24 22:32:05 +05:30
2026-09-24 22:32:05 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:38:35 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:33:58 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-27 00:38:34 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:41:10 +05:30
2026-09-27 02:02:41 +05:30
2026-09-25 21:28:32 +05:30
2026-09-25 16:24:21 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 08:09:47 -07:00
2026-09-23 10:13:26 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 06:46:02 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 08:09:47 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-26 22:39:42 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-21 19:18:15 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-22 17:08:30 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-21 13:18:39 -04:00
2026-09-26 23:49:25 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 23:06:15 +05:30
2026-09-23 16:55:09 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-27 00:48:22 +05:30
2026-09-24 09:20:50 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-26 06:10:53 +05:30
2026-09-23 07:02:44 -04:00
2026-09-24 22:24:48 +05:30
2026-09-24 22:25:06 +05:30
2026-09-26 06:26:48 +05:30
2026-09-24 22:26:23 +05:30
2026-09-23 03:15:26 -07:00
2026-09-27 02:48:48 -05:00
2026-09-23 03:15:26 -07:00
2026-09-24 22:29:32 +05:30
2026-09-23 07:02:44 -04:00
2026-09-24 22:25:37 +05:30
2026-09-23 22:42:14 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 05:29:27 -05:00
2026-09-27 02:22:23 +05:30
2026-09-27 18:18:12 +05:30
2026-09-26 21:00:46 -05:00
2026-09-24 22:41:10 +05:30
2026-09-23 07:02:44 -04:00
2026-09-26 20:29:47 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-24 07:39:33 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-21 23:56:25 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 22:27:18 +05:30
2026-09-23 03:15:26 -07:00
2026-09-24 22:26:23 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-26 20:40:40 -05:00
2026-09-23 03:15:26 -07:00
2026-09-25 12:27:24 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-26 17:15:30 -05:00
2026-09-23 11:33:09 -07:00
2026-09-21 19:18:15 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-24 15:58:19 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00