[Bug]: Codex gpt-6-luna children reason far less than codex exec at the same effort, emit empty exec_command calls and give up early
Before submitting
- [x] I searched existing issues and did not find a duplicate. #31344 looked close, but here the child's effort is
highin the rollout. - [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server (Codex child runs through delegate_task / app-server)
Steps to reproduce
- From a Claude Opus 5.5 parent thread, call
delegate_taskwithtarget: { providerInstanceId: "codex", model: "gpt-6-luna", options: { reasoningEffort: "high" } }and an implementation task of normal size: read a contract file, then edit 3 to 5 files in a TypeScript repo. - Run 4 such children in parallel, plus one top-level Codex gpt-6-luna thread.
- Run the same kind of task with plain
codex exec -m gpt-6-luna -c model_reasoning_effort=high -s workspace-writein the same repo.
Expected behavior
The T3 child works about as long and as thoroughly as codex exec with the same CLI version, model and effort.
Actual behavior
The T3 children stop after 30 to 90 seconds with a final message like "I didn't manage to implement the task" or "partial implementation". Several of them emit exec calls whose command is an empty string just before giving up:
const r = await tools.exec_command({cmd:"",workdir:"<worktree>"}); text(r.output);
Each returns Script completed / Output: "". In one run that happened 5 times in a row.
The rollouts show the same model and effort in both paths (turn_context.effort = "high"; T3 sends configuration_update {"reasoning":{"effort":"high"}}). The reasoning token count is very different. Here are all the gpt-6-luna sessions from one afternoon, codex-cli 0.167.0:
| originator | tool calls | empty cmd:"" |
output tokens | reasoning tokens | result |
|---|---|---|---|---|---|
| codex_exec | 25 | 0 | 16,693 | 4,725 | task finished |
| codex_exec | 3 | 0 | 707 | 335 | small task, finished |
| T3 Code (delegate) | 13 | 5 | 1,436 | 87 | gave up |
| T3 Code (delegate) | 17 | 0 | 4,136 | 160 | partial |
| T3 Code (delegate) | 11 | 0 | 1,980 | 256 | gave up |
| T3 Code (delegate) | 14 | 1 | 3,084 | 141 | finished a small UI change |
| T3 Code (top-level thread) | 14 | 0 | 4,568 | 799 | partial |
| T3 Code (delegate) | 4 | 1 | 983 | 34 | gave up |
| T3 Code (delegate) | 6 | 1 | 1,061 | 67 | gave up |
At "high", T3 turns use 20 to 50 times fewer reasoning tokens than codex exec, and that matches the early give-ups.
Differences I can see between the two rollouts (the prompts are otherwise the same):
source: "vscode", originatorT3 Codeversussource: "exec".collaboration_mode.settings.developer_instructionsis a string under T3 andnullunder exec.- T3 adds the
<t3_code_orchestration_0N>,<t3_code_runtime>,<t3_code_tools>and deferredmcp__t3_codedeveloper messages. - The task is wrapped as "Act as the implementation sub-agent for this task." (or "test sub-agent").
- Sandbox
danger-full-accessversusworkspace-write.
I can't tell from the outside which of these causes the shallow reasoning. The developer_instructions difference and the sub-agent framing seem the most likely.
A separate note that is not part of this bug: our shell-made worktrees caused confusion because the child starts in the parent project's root. The docs already say to use isolation: "worktree" instead, so that one is on us.
Impact
High for Codex-child users. Most delegated implementation tasks come back unfinished, and each one still spends credits. Our workaround is to run gpt-6-luna with codex exec in background shells, which loses T3's thread UI and notifications.
Version
T3 Code 0.1.4-nightly.20261028.3824 (this may be fixed in a newer build; I didn't find a matching changelog entry). codex-cli 0.167.0.
Environment
T3 Code server on Ubuntu (Linux 7.0, arm64, Oracle VM). Claude Code (Opus 5.5) parent, Codex gpt-6-luna children, ChatGPT auth.
Filed by
Drafted and filed by Claude Code (Claude Opus 5.5) from a T3 Code thread, at the repository owner's request. The numbers come from the local Codex rollout files (~/.codex/sessions/...). I can share redacted rollouts if that helps.
I tried to reproduce this on main at ff7aa5ace3 and could not. The T3 path reasoned as much as codex exec on the same task.
What I ran. The task matches your step 1: read src/contract.ts, then migrate 5 TypeScript files to it until node --test passes. Every run used gpt-6-luna at high:
- Through T3 Code: a Claude parent thread called
delegate_task4 times in parallel, withtarget: { providerInstanceId: "codex", model: "gpt-6-luna", options: [{ id: "reasoningEffort", value: "high" }] },role: "implementation"andisolation: "worktree". Each child's rollout hadeffort: "high"and the T3 orchestration/runtime/tools messages. Each child used 416 to 1,112 reasoning tokens and made 8 to 17 tool calls, none with an emptycmd, then reported that all 4 tests pass. The same code went throughcodex exectoo. codex exec -m gpt-6-luna -c model_reasoning_effort=highon the same task: 336 to 832 reasoning tokens, 14 to 19 tool calls, tests pass.codex app-serverwith T3's exactthread/startandturn/startparameters: I removed one difference at a time: the collaboration mode (developer_instructions), the T3 developer messages, the "Act as the implementation sub-agent" prefix, and thesummary: "detailed"/ concurrent reasoning-summary settings. Every variant landed in the same range ascodex exec. I ran this on codex-cli 0.163.0 and on 0.167.0. On 0.167.0,codex execused 466 to 649 reasoning tokens and the T3 shape used 444 to 1,005.
Your table compares different tasks. The codex exec row with 25 calls and 4,725 reasoning tokens was a larger task than the T3 rows, so it does not show a per-path gap by itself.
To narrow this down:
- Redacted rollouts for one T3 child that gave up and for one
codex execrun, both given the same task prompt on the same repo state. - The exact
delegate_taskinput the parent sent for that child. - Whether it still happens on a current nightly. Several Codex adapter changes landed after 0.1.4-nightly.20261028.
Thanks for digging into this. You're right that my first table compared different tasks. Here is a controlled run on the latest nightly.
Setup
- T3 Code updated to 0.1.8-nightly.20261109.4433 on both machines, after a server restart. codex-cli 0.167.0.
- Same prompt both ways, on the same repo and the same commit, a few seconds apart. The task is read-only research: review one branch's diff (
git diff origin/development...<branch>), then report which MCP tools call or duplicate the changed API routes, as a table with file:line evidence. The full task lives in a markdown file, and the prompt only says to read and follow it. - The parent is a Claude Opus 5.5 thread at effort high. Exact
delegate_taskinput:
{
"title": "<title>",
"role": "research",
"isolation": "worktree",
"target": { "providerInstanceId": "codex", "model": "gpt-6-luna", "options": [{ "id": "reasoningEffort", "value": "high" }] },
"task": "Lee y cumple /tmp/<contract>.md entero. Entrega el informe en tu respuesta final."
}
codex exec -m gpt-6-luna -c model_reasoning_effort=high -s read-only --json "<same task string>", run from the repo root.
Rollout facts for the T3 child
turn_context.effort = "high",configuration_update {"reasoning":{"effort":"high"}},summary: "none".- The
cwdis the T3-prepared worktree. - The user message is
Act as the research sub-agent for this task.\n\n<same task string>.
Result
| T3 child (delegate_task, worktree) | codex exec | |
|---|---|---|
| reasoning_output_tokens | 61 | 4,507 |
| output_tokens | 2,097 | 8,578 |
| tool calls | 5 | 9 |
empty cmd:"" |
0 | 0 |
| report | 7 rows, no findings | 12 rows, plus one real finding (a tool schema that lets both payment fields be omitted) and two coverage gaps |
This time the T3 child finished and didn't emit empty commands, so the early give-up didn't reproduce. The reasoning gap is still about 70x on an identical prompt, and the shallower answer missed things the codex exec run found.
One more data point from earlier today, before the update: a top-level gpt-6-luna thread in T3 (no delegate_task) used 178 reasoning tokens over 15 calls on an implementation task. So it doesn't seem specific to delegate_task.
Differences I can still see between the two runs:
source: "vscode"versus"exec".danger-full-accessversus aread-onlysandbox.- The T3 developer messages and the sub-agent prefix.
You already ruled out the last two with app-server, so the sandbox mode and source are the ones I haven't isolated.
I can't attach the full rollouts, because they contain a private codebase. I can share the session_meta, turn_context and token_count lines from both, and the reasoning-summary items, if that helps. I'm also happy to run any variant you want: a different sandbox, a different prefix, or no T3 developer messages.
Thanks for the controlled run. I repeated it on main at 3e4d449308 with codex-cli 0.167.0 and could not reproduce the gap.
What I ran. A synthetic repo with a development branch and a feature branch that changes payment routes, plus four MCP tools that call or duplicate them. One planted defect: the pay tool's schema accepts neither payment field. The contract file asks for your table, findings and coverage gaps. Every run got the same task string as yours: Lee y cumple <contract>.md entero. Entrega el informe en tu respuesta final. The T3 child came from a Claude parent thread calling delegate_task with your exact input (role: "research", isolation: "worktree", gpt-6-luna, reasoningEffort: high). Its rollouts match yours: source: "vscode", danger-full-access, effort: "high", summary: "none", the T3 developer messages and the research sub-agent prefix.
| Path (gpt-6-luna) | reasoning_output_tokens per run |
|---|---|
T3 delegate_task child, high |
2,163 / 1,865 / 1,082 |
codex exec -s read-only, high |
1,108 / 1,070 / 1,450 |
codex exec -s danger-full-access, high |
561 / 2,121 / 1,880 |
codex exec -s danger-full-access, high, CODEX_INTERNAL_ORIGINATOR_OVERRIDE="T3 Code" |
848 / 1,572 |
| T3 top-level thread, no effort selected | 410 / 344 |
codex exec, no effort set |
170 / 639 |
Neither the sandbox mode nor the originator changed the range, and every T3 child reported the planted schema finding. With the same settings, single runs vary by up to about 4x (561 vs 2,121), so one run per side is a noisy comparison. With no effort selected, T3 sends none and Codex falls back to the model default, the same as codex exec without -c model_reasoning_effort.
Fixture and analyzer, if you want to run the same task: make-fixture.sh (make-fixture.sh <dir> builds <dir>/work and <dir>/contract.md), analyze-rollouts.py (python3 analyze-rollouts.py <rollout.jsonl>... prints source, effort, sandbox, reasoning tokens and calls).
To narrow it down on your account, could you run your task (or the fixture) three times each way:
codex exec -m gpt-6-luna -c model_reasoning_effort=high -s danger-full-access --json "<task>"(sandbox only).- The same with
CODEX_INTERNAL_ORIGINATOR_OVERRIDE="T3 Code"set (exec then sends T3's originator). - The T3
delegate_taskchild, three times rather than once.
Then post the reasoning tokens for each, plus the session_meta, turn_context and token_count lines you offered for the 61-token child and the 4,507-token exec run. For the 178-token top-level thread, the effort in its turn_context would also help: if it is null, that thread ran at the model default, not high.
Another data point from real-world use, in case it helps narrow this down. Same setup as the original report: a Claude Opus 5.5 parent calling delegate_task → codex / gpt-6-luna, reasoningEffort: high, mostly role: "implementation", TypeScript monorepo. T3 Code desktop 0.1.7 (beta), macOS.
I aggregated the local Codex rollouts (~/.codex/sessions) for all gpt-6-luna sessions with originator T3 Code and effort: high. Median reasoning_output_tokens per session, by day and cli_version:
| days | cli_version | sessions | median reasoning tokens |
|---|---|---|---|
| Oct 23–24 | 0.163.0 | 28 | ~2,450 |
| Oct 25–28 | 0.164.0 | 200 | 4,000–9,700 |
| Oct 29–30 | 0.165.0 | 83 | 83–208 |
| Oct 30–Nov 6 | 0.166.0 | 357 | 0–830 (mostly 0–40) |
| Nov 6–10 | 0.167.0 | 536 | 0–44 |
So for us the drop is a step change on Oct 29, the day the sessions moved from codex-cli 0.164.0 to 0.165.0, not a gradual degradation. Before that, Luna children finished multi-file tasks routinely; since then most of them give up early, as described above.
Two comparisons from the same machine and period:
gpt-6.1-solthrough the same T3delegate_taskpath,effort: high: median 1,466–4,390 reasoning tokens per session in November, 0 sessions with an emptycmd. Only Luna is affected.- Sessions with at least one empty
exec_command(cmd: ""): Luna through T3 0% on 0.163.0 (37) and 0.164.0 (200), then 32% on 0.165.0, 22% on 0.166.0 and 27% on 0.167.0. Sol through T3: 0% on every version (584 sessions).
Caveats: these are medians over mixed real tasks, not a controlled fixture, so they point at a date and a version, not a cause. The version change and the date are also confounded: if the model or backend changed on Oct 29 as well, codex exec on 0.164.0 would drop too. I have no November codex exec Luna runs to rule that out.
Since your reproductions used 0.163.0 and 0.167.0, which sit on either side of this boundary, a comparison of 0.164.0 vs 0.165.0 on the same fixture (T3 child and plain codex exec) might be the quickest way to tell whether it's a codex-cli change, the way T3 drives the newer CLI, or a server-side change.
This is the same problem as #33823, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.