Automatic approval review fails with `guardian assessment was not valid JSON` in Codex Desktop SSH remote sessions
What version of the Codex App are you using (From “About Codex” dialog)?
26.527.31326 (3390)
What subscription do you have?
BYOK
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Summary
When using the Codex Desktop App to connect to a remote project over SSH, actions that require approval can fail with the following error:
Automatic approval review failed: guardian assessment was not valid JSON
This is not limited to a specific MCP server or external tool. I have observed it with external tool/MCP calls, and also with Codex’s built-in apply_patch editing operation. The issue appears to be related to the Codex Desktop App SSH remote workflow combined with automatic approval review / guardian assessment.
- Remote OS:
Linux 5.15.0-164-generic x86_64 - Remote Codex CLI:
npm codex-cli 0.135.0
Configuration
Remote ~/.codex/config.toml:
approval_policy = "on-request"
sandbox_mode = "read-only"
approvals_reviewer = "auto_review"
Steps to reproduce
- Open Codex Desktop App locally.
- Connect to a remote server using the Desktop App SSH remote feature.
- Open a project directory on the remote server.
- Use a configuration where automatic approval review is enabled:
approvals_reviewer = "auto_review"
- Ask Codex to perform an action that requires approval, for example:
- apply a patch using Codex’s built-in
apply_patchoperation; - invoke an MCP/tool call that requires approval;
- perform another action that triggers automatic approval review.
- The action is rejected with:
Automatic approval review failed: guardian assessment was not valid JSON
Expected behavior
Codex should either:
- Successfully complete automatic approval review and proceed with the approved action, or
- Fall back to a normal user approval prompt if automatic approval review fails, or
- Return a structured, actionable error explaining why the guardian assessment could not be parsed.
Actual behavior
The action is rejected with:
Automatic approval review failed: guardian assessment was not valid JSON
This blocks the operation. The Desktop App UI does not provide an actionable recovery path or enough diagnostic information to understand what response failed JSON parsing.
Scope
This issue does not appear to be limited to MCP/tool calls. It can also happen with Codex’s built-in apply_patch operation.
The common pattern appears to be:
Codex Desktop App
→ SSH remote session
→ action requiring approval
→ approvals_reviewer = "auto_review"
→ automatic guardian review
→ guardian assessment parsing fails
→ action is rejected
Workaround
Changing the remote ~/.codex/config.toml from:
approvals_reviewer = "auto_review"
to:
approvals_reviewer = "user"
or removing the approvals_reviewer = "auto_review" line appears to avoid the issue.
For example:
approval_policy = "on-request"
sandbox_mode = "workspace-write"
approvals_reviewer = "user"
After restarting the Codex Desktop SSH remote session, the same operations can proceed through manual approval instead of automatic approval review.
Requested improvements
It would be helpful if Codex could:
- Fall back to manual approval when automatic approval review fails to produce valid JSON.
- Surface a clearer diagnostic message in the Desktop App UI.
- Log the automatic approval review failure in a way that helps determine whether the invalid JSON came from:
- the guardian reviewer model,
- the app-server / SSH remote transport,
- a provider compatibility issue,
- or a client-side parsing issue.
- Clarify whether automatic approval review is fully supported in Desktop App SSH remote sessions.
What steps can reproduce the bug?
- Open Codex Desktop App locally.
- Connect to a remote server using the Desktop App SSH remote feature.
- Open a project directory on the remote server.
- Use a configuration where automatic approval review is enabled:
approvals_reviewer = "auto_review"
What is the expected behavior?
Codex should handle approval-required actions consistently in Desktop SSH remote sessions when approvals_reviewer = "auto_review" is enabled.
Expected behavior:
- The automatic approval review should return a valid, parseable guardian assessment.
- If the action is approved, Codex should proceed with the requested operation, including built-in actions such as
apply_patchand external tool/MCP calls. - If the action is not approved, Codex should reject it with a clear and actionable reason.
- If the automatic reviewer fails internally or returns an invalid response, Codex should not surface only a low-level JSON parsing error. It should either fall back to manual user approval or display a clear diagnostic message explaining that the automatic approval reviewer failed.
- The behavior should be consistent between local Codex sessions and Codex Desktop SSH remote sessions.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗