Automatic approval review fails with "duplicate field risk_level", commands rejected until app restart

Open 💬 0 comments Opened Aug 7, 2026 by shshdfxh-cloud

What version of the Codex App are you using (From “About Codex” dialog)?

26.730.8199.0

What subscription do you have?

free

What platform is your computer?

Windows 11

What issue are you seeing?

Commands that require automatic approval review are intermittently rejected with:
This action was rejected due to unacceptable risk.
Reason: Automatic approval review failed: duplicate field risk_level at line 1 column ~275-313

Root cause found in local logs: the auto-review reviewer model (configured model: deepseek-v4-flash) sometimes returns a decision JSON with a duplicate risk_level key, e.g.:
{"risk_level":"medium","user_authorization":"high","outcome":"allow","rationale":"...","risk_level":""}
The app rejects the duplicate key and fail-closes the request as "unacceptable risk", even though the reviewer's outcome was "allow". The failure is intermittent and content-independent: the same command was rejected three times and succeeded unchanged after restarting the app.

What steps can reproduce the bug?

Not deterministically reproducible; it depends on the auto-review reviewer model output. Observed pattern:

  1. Configure a custom model for Codex (here: deepseek-v4-flash).
  2. Request escalated commands that go through automatic approval review (e.g. git push).
  3. After some number of reviews, the reviewer occasionally returns a JSON decision containing a duplicate risk_level key; the request is then rejected with "duplicate field risk_level".
  4. Restarting the Codex app clears the condition (a fresh review thread starts).

Evidence: the review thread rollout (~/.codex/sessions/2026/08/07/rollout-2026-08-07T13-55-16-019fdaca-...jsonl) contains the malformed reviewer output with two risk_level keys.

What is the expected behavior?

The approval review pipeline should tolerate/validate the reviewer's JSON (e.g. dedupe keys or retry), and must not report a parser failure as "rejected due to unacceptable risk". A malformed reviewer output should surface as a distinct diagnostic error.

Additional information

  • Reviewer model: deepseek-v4-flash (custom model configured in ~/.codex/config.toml). Likely not reproducible with default OpenAI models.
  • In all observed failures the reviewer's actual decision was "outcome":"allow" — safe commands were falsely rejected.
  • Logs: ~/.codex/logs_2.sqlite (auto_review thread 019fdaca) and the review session rollout contain the exact malformed JSON.
  • Frequency: intermittent; the column number varies (~275-313) with content length.
  • Workaround: restart the Codex app.
  • Suggested fix: deduplicate/validate the reviewer result JSON and treat parse failures separately from genuine risk rejections.

all the issue is created by ai。i just create the issue。

View original on GitHub ↗