Codex treats raw model API completions as full coding-agent delegation

Resolved 💬 2 comments Opened Aug 2, 2026 by luxueliu Closed Aug 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What issue are you seeing?

Codex can conflate two fundamentally different operations:

  1. sending a prompt to a model API and receiving text; and
  2. dispatching a full coding agent that has a workspace, tools, file writes, tests, task state, lifecycle, and result delivery.

The user asked the primary Codex reviewer to delegate review/implementation packages to local coding agents or models and collect their results. Instead, Codex called an OpenAI-compatible chat/completions-style gateway and described the returned text as if an independent Code/CLI agent had executed the task.

A raw completion endpoint cannot, by itself:

  • inspect the current workspace unless all relevant content is embedded in the prompt;
  • edit files or run tests;
  • preserve task lifecycle and pending state;
  • report a reliable diff, exit status, or completed artifact;
  • deliver a structured terminal result to the parent.

This caused timeouts, reasoning-only responses, and empty content fields to be treated as failed or incomplete "agent reviews," even though no coding-agent runtime had actually been launched.

This is adjacent to #26822 but distinct: #26822 concerns native subagent lifecycle/result loss. Here, the parent never had a coding-agent runtime at all; it mislabeled a raw model completion as delegation.

Reproduction shape

  1. Ask Codex to act as a primary reviewer and delegate a task to another local Code/CLI agent.
  2. Provide both a raw OpenAI-compatible model endpoint and one or more installed coding-agent surfaces.
  3. Require the delegate to inspect files, run tests, and return a result.
  4. Observe Codex choose the raw API endpoint, submit a large prompt, and label the returned text as an executed independent review.

Expected behavior

Before saying "delegated to Code" or "agent completed":

  • verify a callable coding-agent runtime exists;
  • verify it can access the intended workspace;
  • launch it through that runtime;
  • retain a task/session identifier;
  • collect its diff, command/test evidence, and terminal result.

If only a raw model endpoint is available, Codex must say "model completion only; no Code agent was dispatched."

Actual behavior

The distinction was erased. Model names containing words such as "code" and text produced by a gateway were treated as evidence of a full Code task, making review state and result recovery unreliable.

Environment

  • OpenAI Codex Desktop for Windows: 26.727.6591.0 (x64 MSIX)
  • VS Code extension: 26.727.40816
  • Codex CLI recorded in rollouts: 0.146.0-alpha.9.2
  • Windows: 10.0.26200.8875
  • Model observed: GPT-5.6 Sol

Measured incident impact

This symptom occurred inside the same August 1-2 recovery incident documented in #34477 and #36555.

Local rollout reconstruction now replaces the earlier rough ">500M" estimate:

  • Initial ARCH task family: 11 sessions, 420,775,426 tokens
  • Reopened ARCH task family: 5 sessions, 61,684,846 tokens
  • Harness/recovery task families: 76,001,530 tokens
  • Original incident total: 558,461,802 tokens
  • Later failed ARCH-F1 reattempt: 25,544,534 tokens
  • Cumulative affected/recovery total: 584,006,336 tokens
  • User-visible quota impact during the original incident: approximately 80% of the weekly allowance (about 60% in the first run and another 20% after reopening)

Totals are the final payload.info.total_token_usage.total_tokens values from local rollouts, grouped by root thread and child parent_thread_id. Private project transcripts are not attached.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 26 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #36554

Powered by Codex Action

xiedongqingxiao-ops · 26 days ago

Closing this duplicate in favor of the earlier canonical report #36554, which now includes the exact incident-loss reconstruction.