Skip to content

[Bug]: Codex delegate_task child completes in ~5 s without the task text in the turn input #37723

Closed

Description

@joseehilton147

A delegate_task child on the Codex provider can finish as completed in about 5 seconds with no assistant message, no tool call and no file change. The Codex rollout shows the task text never reached the model: the turn has only the AGENTS.md instructions and the environment context. The parent then reads completed and assumes the work was done.

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Orchestrator delegate_task and the Codex provider (turn input sent to codex app-server).

Steps to reproduce

I could not reduce it to a minimal case yet. What I observed:

  1. From a Claude thread in project A, call delegate_task with target: { providerInstanceId: "codex", model: "gpt-6.1-sol", options: { reasoningEffort: "medium" } }, isolation: "shared", mode: "async" and a multi-paragraph task.
  2. Do it twice in a row (two children, 12 s apart).
  3. Both children end completed in about 5 s.

In the same hour, from a different parent thread in project B, the same target worked twice: once with isolation: "worktree" and a long task, and once with isolation: "shared" and the task Reply with exactly one word: PONG. (summary PONG). So worktree vs shared is not the trigger.

Expected behavior

The child either runs the task, or ends with a failed status and the error, so the parent does not mistake an empty run for finished work.

Actual behavior

  • The child thread has two items: the task user_message and a checkpoint with text [].
  • The run is completed, executedModel: gpt-6.1-sol, started to completed in about 5 s.
  • The parent gets the notification "Child task completed without an assistant result" with status completed.

The Codex rollout of each failing child (~/.codex/archived_sessions/rollout-...jsonl, originator: "T3 Code", cli_version: "0.169.0") has 10 lines. Its only user response item holds two text parts: the AGENTS.md block (12,249 chars) and the environment context (441 chars). The delegated task text is absent. The turn ends with task_complete, last_agent_message: null, duration_ms about 4,800.

For contrast, the rollout of a working child has the AGENTS.md block followed by the task text as a separate user message.

Impact

Major degradation or frequent failure

An orchestrating agent reads completed and moves on as if the delegated work was done. Nothing in the parent's view says the child never saw the task.

Version or commit

Codex CLI 0.169.0 (from the rollout session_meta). T3 Code desktop build from 2026-11-16.

Environment

Windows 11, T3 Code desktop. Codex model provider is a custom OpenAI-compatible endpoint (model_provider in ~/.codex/config.toml), used by both the failing and the working children.

Logs or stack traces

rollout of a failing child (types only):
session_meta  originator="T3 Code" cli_version="0.169.0"
response_item additional_tools (developer)
response_item message (developer)  base instructions
response_item message (developer)  memory
response_item message (user)       [AGENTS.md 12249 chars, environment_context 441 chars]
world_state
turn_context
event_msg     thread_settings_applied
event_msg     task_complete  last_agent_message=null  duration_ms≈4840

Workaround

After a Codex child returns, read its thread. Treat completed with no assistant message as a failure and delegate again.

Related

Activity

  1. juliusmarminge commented on Nov 16, 2026

    @juliusmarminge
    Member

    @joseehilton147 For one failing child, can you share the turn/start request from its T3 provider log (<T3 home>/userdata/logs/provider/events.thread-delegated-task-…log)? Mainly: is its params.input empty ([]) or does it contain the task text? And are there other lines for that thread before the turn/start mentioning restart-continuation, resume, a /goal command or a capacity retry?

  2. added
    needs more info
    on Nov 16, 2026
  3. joseehilton147 commented on Nov 16, 2026

    @joseehilton147
    Author

    Thanks. I pulled the provider logs, and they point away from T3's turn input.

    1. params.input is not empty. In both failing children, turn/start carries one text part with the full task: 3,540 chars in one child and 2,567 in the other. My earlier claim that the task never reached the turn was wrong. I was reading the Codex rollout, and the hook stopped the turn before the task was recorded there.

    turn/start params keys: approvalPolicy, approvalsReviewer, cwd, effort, input, model,
      sandboxPolicy, summary, threadId, collaborationMode, additionalContext, cyberAccessProgram
    input: [ { type: "text", text: <3540 chars, the delegated task> } ]
    additionalContext keys: t3_code_orchestration_01..03, t3_code_runtime, t3_code_tools
    

    2. No restart-continuation, resume, /goal or capacity retry. For both threads the log is a clean thread/start → turn/start. Nothing else precedes it, and I found none of those strings anywhere in either file.

    3. What actually ends the turn: a sessionStart hook from a locally installed Codex plugin returned stop. Event sequence for one failing child (timestamps UTC, ids and paths removed):

    17:10:30.734 out thread/start        (cwd = <repo B>, threadSource = subagent)
    17:10:32.728 in  result thread       (modelProvider = custom, status idle)
    17:10:32.773 out turn/start          (input = 1 text part, 3540 chars)
    17:10:32.879 in  result turn         (status inProgress, items [])
    17:10:33.372 in  turn/started
    17:10:36.057 in  hook/started        eventName=sessionStart, source=plugin, executionMode=sync
    17:10:37.694 in  hook/completed      status=stopped, entries=[{kind:"stop", text:<plugin's own block message>}]
    17:10:37.708 in  turn/completed      status=completed, error=null, items=[], durationMs=4842
    

    The second failing child is identical: sessionStart → stopped, then turn/completed with status completed, no items, 4,829 ms.

    I scanned every Codex delegated-child log from that day (13 threads):

    sessionStart hook result children outcome
    stopped 2 completed in ~4.8 s, 0 items
    completed or not run 11 real work, 20 s to 29 min, 2 to 241 items

    So the trigger is the hook, not the project or the shared/worktree isolation. The plugin's hook fails in the cwd of the second project and succeeds in the first. That is my plugin's bug, and I'm fixing it on my side.

    What may still be worth a look in T3. When a hook stops the turn, the child ends with completed and no assistant message. The parent then gets "Child task completed without an assistant result", status completed, so an orchestrator can't tell "the hook blocked the turn" from "the model finished". The hook/completed with status: stopped and the stop entry text are in the stream T3 already logs. Surfacing them, as a distinct status or at least in the child summary, would have shown the cause right away.

    Happy to retitle this to that narrower point, or close it if you see it as working as intended.

  4. removed
    needs more info
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions