Repository navigation
fix(hub): serve Codex models their tools in code mode - #124
Merged
TheGreatAxios merged 2 commits intoNov 4, 2026
Merged
TheGreatAxios merged 2 commits into
TheGreatAxios merged 2 commits into
Conversation
Codex models are trained to reach tools through one exec tool that runs
JavaScript. Given plain function tools, GPT-6.1 Terra repeats its last
call with identical arguments until the doom-loop guard fails the run,
and writes placeholder arguments. The Codex adapter offers one exec tool
that declares every tool, under a JavaScript-safe alias of its name, on
a typed tools object rendered from its JSON schema. It replays past
calls as scripts and turns the one tools.<name>({...}) call a script
makes back into an ordinary tool call, so the reactor still gates,
audits and loop-checks it. Scripts are read, never run: the argument is
parsed with Bun.JSON5, and any other script, such as one with a
condition, loop or second call, becomes an exec call answered with the
rules.
A Codex script the hub cannot read reaches the transcript as an exec call whose result is "unknown tool: exec", which reads like a platform fault. The step is named as rewriting a tool call and its result says the assistant was asked to write it again.
TheGreatAxios
commented
Nov 4, 2026
TheGreatAxios
left a comment
Contributor
Author
There was a problem hiding this comment.
Review · Comment
The Codex adapter serves Codex models their tools through one exec code tool and turns the call in each script back into an ordinary Interchange tool call; the transcript describes an unreadable script in plain words.
No findings.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Triage will approve, request review. |
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
execcode tool that declares every tool on a typedtoolsobject rendered from its JSON schema, and replays past calls and their results as scripts.tools.<name>({...})call in a model's script reaches Interchange as an ordinary tool call, so approvals, audit and the doom-loop guard apply to it. Scripts are read, never run; arguments are parsed withBun.JSON5.Verification
bun run lint,format:check,typecheck,test(216 pass),pins:verifyandvendor:verifypass.request_approvalcalled throughexecstops at the approval gate before it runs, in 4 of 4 runs.Closes CL-12050