codex - 💡(How to fix) Fix MCP tool approval_mode=approve still prompts when encrypted tool payload cannot be inspected [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20289Fetched 2026-04-30 06:30:35
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Error Message

includeError: true includeWarning: true includeInfo: false

Root Cause

This appears to happen before or outside the normal MCP approval-mode handling, because the configured approve setting should have allowed the call.

Fix Action

Workaround

Calling the same local MCP server directly over HTTP from shell avoids the prompt:

Invoke-RestMethod -Uri 'http://127.0.0.1:8787/mcp' -Method Post -Body $body -ContentType 'application/json'

So the issue seems specific to Codex's MCP wrapper/tool approval path, not the MCP server itself.

Code Example

Encrypted assistant message and tool call in payload — unclear if allowed.

---

includeError: true
includeWarning: true
includeInfo: false

---

[mcp_servers.unity]
url = "http://127.0.0.1:8787/mcp"
supports_parallel_tool_calls = false
default_tools_approval_mode = "approve"

[mcp_servers.unity.tools.unity_get_console_logs]
approval_mode = "approve"

---

Encrypted assistant message and tool call in payload — unclear if allowed.

---

Invoke-RestMethod -Uri 'http://127.0.0.1:8787/mcp' -Method Post -Body $body -ContentType 'application/json'
RAW_BUFFERClick to expand / collapse

What happened?

A configured local MCP server tool still triggered an approval prompt even though both the server default and the specific tool were configured with approval_mode = "approve".

The prompt reason shown by Codex was:

Encrypted assistant message and tool call in payload — unclear if allowed.

The tool call itself was a read-only Unity MCP console-log query with these arguments:

includeError: true
includeWarning: true
includeInfo: false

Relevant config

~/.codex/config.toml contains:

[mcp_servers.unity]
url = "http://127.0.0.1:8787/mcp"
supports_parallel_tool_calls = false
default_tools_approval_mode = "approve"

[mcp_servers.unity.tools.unity_get_console_logs]
approval_mode = "approve"

Other Unity MCP tools are also configured with approval_mode = "approve".

Expected behavior

Codex should trust the configured MCP tool approval mode and run the tool without asking for user approval.

Actual behavior

Codex displayed an approval prompt anyway, with this reason:

Encrypted assistant message and tool call in payload — unclear if allowed.

This appears to happen before or outside the normal MCP approval-mode handling, because the configured approve setting should have allowed the call.

Workaround

Calling the same local MCP server directly over HTTP from shell avoids the prompt:

Invoke-RestMethod -Uri 'http://127.0.0.1:8787/mcp' -Method Post -Body $body -ContentType 'application/json'

So the issue seems specific to Codex's MCP wrapper/tool approval path, not the MCP server itself.

Environment

  • OS: Windows
  • MCP server: local HTTP server at 127.0.0.1:8787
  • Codex config uses MCP default_tools_approval_mode = "approve"
  • Tool involved: unity_get_console_logs

extent analysis

TL;DR

The issue may be resolved by adjusting the Codex configuration to handle encrypted assistant messages and tool calls, potentially by adding an explicit approval mode for encrypted payloads.

Guidance

  • Verify that the approval_mode setting is correctly applied to the specific tool and server configuration, and that there are no overriding settings that might cause the approval prompt.
  • Check the Codex documentation for any specific requirements or settings related to encrypted assistant messages and tool calls, as the error message suggests this might be a factor.
  • Consider testing the tool call with a non-encrypted payload to see if the approval prompt is still triggered, to help isolate the issue.
  • Review the Codex configuration file (~/.codex/config.toml) for any typos or inconsistencies that might be causing the issue.

Example

No code snippet is provided as the issue seems to be related to configuration and not code.

Notes

The issue appears to be specific to the Codex MCP wrapper/tool approval path, and not the MCP server itself, as the same call works when made directly over HTTP.

Recommendation

Apply workaround: Adjust the Codex configuration to handle encrypted assistant messages and tool calls, as the current configuration does not seem to be correctly applying the approval_mode setting.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex should trust the configured MCP tool approval mode and run the tool without asking for user approval.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix MCP tool approval_mode=approve still prompts when encrypted tool payload cannot be inspected [1 comments, 2 participants]