Repository navigation
Report content-filter retries and failures to App Server clients - #19
Merged
Merged
Conversation
Harold Hunt (huntharo)
force-pushed
the
pwragent
branch
from
November 15, 2026 19:26
f4bf861 to
26c43ca
Compare
Harold Hunt (huntharo)
force-pushed
the
agent/content-filter-protocol
branch
from
November 15, 2026 20:10
a511efd to
8125ea4
Compare
Harold Hunt (huntharo)
marked this pull request as ready for review
November 15, 2026 21:58
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.
When a Responses API sample ends with
response.incomplete/reason: content_filter, a release App Server could recover without notifying its client: the first WebSocket retry was suppressed, reported retries were labeledresponseStreamDisconnected, and exhausted retries becameother.This change always reports content-filter retries with
codexErrorInfo: "contentFilter"andResponse blocked by content filter; retrying (1/N). Terminal failures carry the same code. It preserves the developer-guidance sampling retry, ordinary first WebSocket reconnect suppression, and thereason: content_filtertext inadditionalDetailsused by older PwrAgent builds.Rebased on
pwrdrvr/pwragentat26c43ca834ab91383e6f911a853519ff1bdd7c20. Both bugs remain present on this updated base; the original reproduction was againstf4bf86151960caeee799e0e434cba482eee21072and upstream81b995a6c9. This is a downstream draft PR targetingpwragent. No release tag is created.Regression evidence
Original pre-fix evidence was captured on tests-only commit
ebd46fbbb4eec534c832b40d8ec3ae3c44f31414. The rebased tests-only commit is10064da1b1; the same regression assertions are retained.content_filter_recovery_reports_first_retry::{http,websocket}checks exactly one raw App Servererror,willRetry: true, the wire code/message/details, and successful completion witherror: null.content_filter_exhaustion_reports_failed_turnchecks the retry notification, terminal notification, and failed turn error code.ordinary_first_websocket_reconnect_stays_hiddenchecks the release behavior with a real dropped sampling connection after successful startup prewarming.Pre-fix runs with debug assertions disabled produced 3 failing content-filter transport tests and 1 passing ordinary reconnect test. The WebSocket regression received zero errors instead of one; HTTP/exhaustion received
responseStreamDisconnectedinstead ofcontentFilter. The core mapping and v2 conversion regressions independently failed withother. Logs are retained in the assigned worktree's.local/red-{app-server,protocol,app-server-protocol}.log. The final fix also removes the unused HTTP expectation from the WebSocket fixture's teardown.Compatibility and scope
Audited enum consumers: core serialization/status replay, v2 conversion, guardian reviewer exhaustive retry classification, TUI, analytics/telemetry, generated TypeScript, and Python SDK. Existing Rust unknown-tag fallbacks and TypeScript open unions accept new classifications. The regenerated Python SDK accepts both
contentFilterand an unknownfutureErrorstring. Guardian terminal retry policy is preserved. No PwrAgent change is needed for its existingdetectProviderResponseBlockrule in pwrdrvr/PwrAgent#3720.Regenerated stable JSON/TypeScript fixtures, stable/experimental embedded exports, and Python SDK types using the repository generator.
Open question: a recovered block still leaves no item in
thread/read. Persisting a dedicated marker would require a separate protocol change.Validation
Post-rebase validation uses Rust 1.99.1 on 2026-11-15: 856 selected tests passed, plus formatting and scoped all-targets clippy. Pre-fix rows below retain the original regression evidence; all other results are rerun on the updated base. Run from
codex-rsunless a command explicitly starts at the repository root. Transport tests use the release notification policy without an optimized rebuild:The inherited sandbox network marker was removed only for authorized test execution against local mocks; otherwise
skip_if_no_network!returns without exercising the test. The release-mode fixture omits the App Server's debug-only startup flag.cargo nextest run --locked -p codex-protocol --lib -E 'test(content_filter_maps_to_protocol)'(tests only, before fix)otherinstead ofcontent_filter.cargo nextest run --locked -p codex-app-server-protocol --lib -E 'test(content_filter_error_info_converts_to_camel_case)'(before fix)otherinstead ofcontentFilter.cargo nextest run --locked -p codex-app-server --test all --no-fail-fast -E 'test(suite::v2::content_filter::)'(before fix)cargo nextest run --locked -p codex-protocol -p codex-app-server-protocol -p codex-guardian-reviewer --lib --no-fail-fastcargo nextest run --locked -p codex-core --lib --no-fail-fast -E 'test(responses_retry::)'cargo nextest run --locked -p codex-core --test all --no-fail-fast -E 'test(content_filter) | test(websocket_fallback) | test(turn_error_details) | test(retry_after)'cargo nextest run --locked -p codex-app-server --test all --no-fail-fast -E 'test(suite::v2::content_filter::)'(after fix)cargo nextest run --locked -p codex-tui --lib --no-fail-fast -E 'test(live_app_server_stream_recovery) | test(stream_error)'cargo clippy --locked -p codex-core -p codex-protocol -p codex-app-server-protocol -p codex-app-server -p codex-tui -p codex-guardian-reviewer --all-targetsFrom the repository root:
All five commands passed. Formatting used CI-pinned
just 1.51.0and a worktree-local DotSlash launcher. No unrelated formatter changes are included.Helper build: downloaded the new base's
152.2.0ptrcomp_sandbox_releaseDarwin arm64 archive/binding pair from the same Codex release used by fork CI, verified the manifest againstthird_party/v8/rusty_v8_152_2_0_release_manifests.sha256, and verified both artifact SHA-256 checksums. The helper build passed:Python compatibility smoke (repository root) passed:
Unposted upstream issue
Searched upstream issues again on 2026-11-14, including
"content_filter" "codexErrorInfo" in:body(no matches), and reviewed openai#60145, openai#56432, openai#56875, and openai#38831. Their bodies do not describe this combined protocol visibility gap. A draft following.github/ISSUE_TEMPLATE/4-bug-report.ymlis saved at.local/upstream-content-filter-issue.mdin the assigned worktree. It has not been posted; the operator decides whether to file it.