fix: make Codex CLI the single writer for apply_patch#926
Merged
piorpua merged 3 commits intoiOfficeAI:mainfrom Feb 21, 2026
Merged
fix: make Codex CLI the single writer for apply_patch#926piorpua merged 3 commits intoiOfficeAI:mainfrom
piorpua merged 3 commits intoiOfficeAI:mainfrom
Conversation
piorpua
approved these changes
Feb 21, 2026
Contributor
piorpua
left a comment
There was a problem hiding this comment.
LGTM. The fix correctly removes the redundant apply_patch calls in CodexAgentManager, making Codex CLI the single writer. Clean and minimal change.
piorpua
pushed a commit
that referenced
this pull request
Feb 21, 2026
PR #926 made Codex CLI the single writer for apply_patch, removing the two call sites of applyPatchChanges. This removes the now-unreachable method and its unused FileChange import.
3 tasks
Contributor
|
Thanks for the fix @seonhwi07jp! This correctly makes Codex CLI the single writer for I've removed the now-dead |
IceyLiu
added a commit
that referenced
this pull request
Feb 21, 2026
refactor: remove dead applyPatchChanges after #926
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.
Summary
This PR intentionally includes only one scope: apply_patch write-path behavior.
Why This Change Was Needed
During approval handling, AionUI could apply file edits locally before or in parallel with Codex CLI applying the same patch. That creates a dual-writer path and can desynchronize:
This is why users can observe failed result but file changed class symptoms.
Root Cause (Code Evidence)
The same patch could be written twice from two independent paths:
How Gemini and Other Local Backends Handle This
In existing non-Codex managers, approval is forwarded and execution happens in the agent/worker path; manager layer does not perform a second local write.
awaiting_approvalandexecutingstates in one pipeline:This PR aligns Codex manager behavior with that single-writer model.
What Changed
Scope / Risk
Validation