Skip to content

docs: audit Codex wire-contract parity for the OpenAI dialect - #644

Open
mpscholten wants to merge 1 commit into
masterfrom
2026-08-27-codex-parity-audit
Open

docs: audit Codex wire-contract parity for the OpenAI dialect#644
mpscholten wants to merge 1 commit into
masterfrom
2026-08-27-codex-parity-audit

Conversation

@mpscholten

Copy link
Copy Markdown
Member

Field-by-field audit of our Responses requests against codex-rs (reference checkout 4f39251), motivated by the gpt-5.6-sol runaway sessions (#641).

Findings:

  • Wire parameters, the Responses Lite prefix (additional_tools + functions namespace), and the AGENTS.md wrapper already match Codex exactly.
  • The real drift is structural, ranked in the doc: gpt-5.6-* run tool_mode: code_mode_only with unified exec_command/write_stdin in Codex (no shell_command exists there any more — it survives only as a serde alias), and instructions come from the per-model catalog instructions_template (sol: 17.7k chars) rather than a static prompt. Our direct-function-call surface is one generation behind for these models, which is the most plausible reason the same model degenerates more often here than under Codex.
  • Codex has no client-side degeneration guards (audited) — our fix(responses): surface streamed tool-call arguments as live activity #641 warning + abort cap is an intentional addition.
  • Verified non-issue: the hallucinated member_/task_ nested worktree path from the 220 KB runaway does not exist on disk; our worktree layout is flat, so no layout change is needed.

Recommended follow-ups are listed by impact (code mode, exec_command migration, catalog instructions, <environment_context>, prompt_cache_key).

🤖 Generated with Claude Code

Field-by-field comparison of our Responses requests against codex-rs
(reference checkout 4f39251), motivated by the gpt-5.6-sol runaway
tool-argument sessions. Wire parameters, the Responses Lite prefix, and
the AGENTS.md wrapper already match; the real drift is structural:
gpt-5.6-* run code_mode_only with unified exec_command in Codex while
we expose an earlier-generation shell_command function tool and a
custom prompt instead of the per-model catalog instructions template.
Records the matching surface, the drift ranked by impact with
recommendations, the intentional divergences, and the verified
non-issue around hallucinated member/task worktree paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac876f487c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/codex-parity.md

- **Runaway guards.** Codex has *no* client-side repetition or
argument-volume guard (audited: only output truncation caps). Our
argument-stream activity, 100k-char warnings, and 300k-char abort (#641)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the nonexistent 300k abort claim

The #641 guard does not abort a response at 300k characters. countToolArgumentChars in Agent.Responses.LoopBackend only emits WarningRaised every 100,000 characters and allows streaming to continue until the provider limit or a manual cancellation. This statement, together with the earlier recommendation to rely on the current guards, incorrectly tells maintainers that runaway generations are automatically bounded.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant