Client or integration
Codex code mode through translated Responses/Chat providers.
Area
Custom tool compatibility.
Summary
#4983 recognizes additional malformed exec/apply_patch representations, including outer Markdown fences and fallback fields, but helper compilation still receives the original wrapper.
resolveCodeModeHelperName decides that the repaired body is an apply_patch call. Its callers then pass the original argumentsText to compileCodeModeHelperInput. The compiler's apply-patch branch unwraps only input and patch; it does not consume the other accepted fallback fields or strip the outer fence. Generated JavaScript can therefore call tools.apply_patch with the JSON wrapper or fenced text instead of the patch.
Expected behaviour
Recognition and compilation must consume one canonical repaired body. A representation accepted as an apply-patch helper must compile exactly that patch text, while ordinary caller-defined exec input remains byte-exact.
Required regressions
- every accepted fallback field compiles to the same raw patch;
- fenced and unfenced forms compile identically;
- a normal code-mode JavaScript body remains unchanged;
- a caller-defined non-code-mode
exec is never reinterpreted; and
- the compiled nested helper succeeds through the actual bridge, not only a recognizer unit test.
Regression origin
Merged in #4983; current dev still calls compileCodeModeHelperInput(args, helper) with the pre-repair args.
Client or integration
Codex code mode through translated Responses/Chat providers.
Area
Custom tool compatibility.
Summary
#4983 recognizes additional malformed
exec/apply_patchrepresentations, including outer Markdown fences and fallback fields, but helper compilation still receives the original wrapper.resolveCodeModeHelperNamedecides that the repaired body is anapply_patchcall. Its callers then pass the originalargumentsTexttocompileCodeModeHelperInput. The compiler's apply-patch branch unwraps onlyinputandpatch; it does not consume the other accepted fallback fields or strip the outer fence. Generated JavaScript can therefore calltools.apply_patchwith the JSON wrapper or fenced text instead of the patch.Expected behaviour
Recognition and compilation must consume one canonical repaired body. A representation accepted as an apply-patch helper must compile exactly that patch text, while ordinary caller-defined
execinput remains byte-exact.Required regressions
execis never reinterpreted; andRegression origin
Merged in #4983; current
devstill callscompileCodeModeHelperInput(args, helper)with the pre-repairargs.