fix(codex): preserve valid tool inputs and result pairing - #65
Merged
Merged
Conversation
NishantJoshi00
force-pushed
the
codex/issue-59-native-tools
branch
from
September 23, 2026 22:04
61947c7 to
8bc21f8
Compare
NishantJoshi00
added a commit
that referenced
this pull request
Sep 23, 2026
Restore Codex-native shell and patch calls when exporting transcripts. Follow-up correctness fixes and regression coverage are in #65.
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.
Issue: #59
What changed and why?
This follows #60. Raw
ApplyPatcharguments can still export as a JSON object even though Codex requirescustom_tool_call.inputto be a string. Serialize those arguments as text, while unwrapping native patch envelopes unchanged.Keep foreign
WebSearchcalls in their existing function-call form. Converting their arguments directly to a native search action can omit the required actiontype, while leaving afunction_call_outputwithout its matching function call. Native search conversion needs to handle both sides together.Track pending patch calls in message order so a completed ID can be reused by a shell command, edit, write, or raw patch. Scope reader-side duplicate suppression to each function/custom call occurrence; a later canonical result must not erase an earlier call's only result.
Add regressions for reuse in both directions and duplicate shell/patch result records in either order, including structured error output. Exercise overlapping calls, out-of-order completion, and ID reuse through a saved and reloaded Codex session. Extend coverage for shell working directories and call IDs, multiline and empty-file patches, and raw patch inputs. Document the patch format's newline, replace-all, and write limitations.
Dependency
Follows #60, now merged into
main. This PR targetsmainand contains the follow-up fixes and regression coverage.Validation
1663f72for wrong native result types or lost results, then pass with the fix.The smoke test checks serialization and native patch application. It does not run a model-backed resumed turn.