codex - 💡(How to fix) Fix Subagent patch approval prompt omits diff/file details in parent TUI [2 comments, 3 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#19902Fetched 2026-04-28 06:35:20
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1

Fix Action

Fix / Workaround

The worker should write a short markdown note to that file using apply_patch, then return only the file path.

The parent TUI approval prompt shows the target file and patch/diff, similar to a normal top-level apply_patch approval.

The patch details are present in Codex logs, but they are not rendered in the parent approval UI.

Code Example

+ # Repro
+ This file was written by a worker.
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.125.0

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

Windows 11/WSL2 Ubuntu

What terminal emulator and version are you using (if applicable)?

Windows Terminal > Ubuntu WSL

What issue are you seeing?

When a subagent/worker requests a file edit, the parent Codex TUI shows an approval prompt but does not show the actual edit contents or affected file path.

Example prompt: • Waiting for Kant [worker] Would you like to make the following edits? Thread: Kant [worker]

› 1. Yes, proceed (y) 2. Yes, and don't ask again for these files (a) 3. No, and tell Codex what to do differently (esc)

What steps can reproduce the bug?

  1. Start Codex with a read-only sandbox and approval-on-request enabled.

sandbox_mode = "read-only" approval_policy = "on-request"

  1. Open a repo/workspace where Codex can spawn subagents.
  2. Ask Codex to spawn a worker subagent that writes one specific scratch file. Example prompt:

Spawn a worker subagent. Instruct it to create only this file:

docs/repro-subagent-approval.md

The worker should write a short markdown note to that file using apply_patch, then return only the file path.

  1. Wait for the worker to attempt the file write.
  2. Observe the parent TUI approval prompt.

Expected Result

The parent TUI approval prompt shows the target file and patch/diff, similar to a normal top-level apply_patch approval.

Example:

Add File: docs/repro-subagent-approval.md

+ # Repro
+ This file was written by a worker.

Actual Result

The parent TUI shows only a generic approval prompt with the worker/thread name, but no diff or target file details:

• Waiting for Kant [worker]

Would you like to make the following edits?

Thread: Kant [worker]

› 1. Yes, proceed (y) 2. Yes, and don't ask again for these files (a) 3. No, and tell Codex what to do differently (esc)

The patch details are present in Codex logs, but they are not rendered in the parent approval UI.

What is the expected behavior?

The approval prompt should show the same patch/diff and target file path that would be shown for a normal top-level apply_patch approval. At minimum it should show:

  • Subagent/thread name
  • Target file paths
  • Whether files are added/updated/deleted
  • The diff or a way to expand/view it
  • The allow-scope implied by “don’t ask again for these files”

Actual behavior: The prompt only says “make the following edits” but displays no edits. This forces the user to approve or deny blind.

Additional information

The underlying logs do contain the patch. In my case the worker was adding a tmp audit file:

ToolCall: apply_patch *** Begin Patch *** Add File: docs/post-edit-factual.md

So this appears to be a TUI rendering/approval propagation issue: the child session has the patch payload, but the parent approval prompt only displays metadata.

extent analysis

TL;DR

The issue can be addressed by modifying the approval prompt rendering logic to include patch details from the child session.

Guidance

  • Verify that the patch details are correctly logged in the Codex logs, as mentioned in the issue.
  • Investigate the approval prompt rendering logic to determine why the patch details are not being displayed.
  • Check if there are any configuration options or flags that can be used to enable the display of patch details in the approval prompt.
  • Consider modifying the approval_policy configuration to include additional details, such as approval_policy = "on-request-with-patch" (if such an option exists).

Example

No code snippet is provided as the issue does not contain sufficient information about the underlying codebase.

Notes

The issue appears to be specific to the Codex TUI and approval prompt rendering, and may require modifications to the Codex codebase to resolve.

Recommendation

Apply a workaround by modifying the approval prompt rendering logic to include patch details from the child session, as this is the most likely cause of the issue.

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…

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 Subagent patch approval prompt omits diff/file details in parent TUI [2 comments, 3 participants]