Files
openclaw/extensions
Darren2030 ceb7a4adba fix(codex): project guardianWarning circuit-breaker notification (#101220)
* fix(codex): project guardianWarning circuit-breaker notification

Codex emits a `guardianWarning` notification from its rejection
circuit-breaker (e.g. 3 consecutive or 10 total denials in a turn)
right before ending the turn as interrupted. The app-server event
projector had no case for it, so the rejection-limit reason was
silently dropped and the turn degraded to a generic interruption.

Project it on the `codex_app_server.guardian` stream with phase
"warning", alongside the existing autoApprovalReview handling. The
exact v2 param shape is not bundled in OpenClaw's protocol schemas,
so the human-readable reason is read defensively.

Closes #101207

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(codex): route guardianWarning through thread-scoped filter

`guardianWarning` is thread-scoped — codex emits it with only
{message, threadId} (no turnId). The turn-strict pre-switch filter
therefore dropped it before it reached the projection switch, making
the handler added in the previous commit dead code for real traffic.

Correlate it on the thread alone (mirroring hook notifications) so it
reaches the switch, and read the `message` field per the codex schema.
The regression test now sends the real {threadId, message} shape
instead of a synthetic turnId, so it actually exercises the routing.

Refs #101207

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* repro(codex): add real behavior proof for guardianWarning projection

* fix(codex): narrow guardian warning projection

Co-authored-by: 曾文锋0668000834 <zeng.wenfeng@xydigit.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-06 19:33:24 -07:00
..