Skip to content

Sub-agent task payload still dropped for custom providers on codex-cli 0.154.0 (Windows, Responses-profile) — silent no-op #45233

Open

Description

@jianpingsong4028-max

Environment

What happens

spawn_agent returns success ({"task_name":"/root/<name>"}), the child thread starts a turn, but the task body never reaches it. In the child rollout the task item is persisted as:

{"type":"agent_message","author":"/root","recipient":"/root/<name>",
 "content":[
   {"type":"input_text","text":"Message Type: NEW_TASK\nTask name: /root/<name>\nSender: /root\nPayload:\n"},
   {"type":"encrypted_content","encrypted_content":"<the actual task text>"}
 ]}

The child model only receives the envelope (Payload: with nothing after it) plus an opaque encrypted_content block, so it replies that it received no task.

Evidence

  • 3 children were spawned (source.subagent.thread_spawn, depth: 1); in each child rollout the only user item is the <recommended_plugins> environment block — no user/agent message carries the task text.
  • 3/3 children replied "no task content received" (verbatim, independently).
  • followup_task retries (3 messages) and a one-line probe produced the same envelope shape.
  • Two wait_agent calls timed out (300 s and 420 s).
  • spawn_agent never returned an error, so the parent kept waiting for agents that could not act.

Expected

  • The spawn task and any followup_task payload should be presented to the child as readable message text.
  • A delivery failure should surface as an error (or the spawn should ack only after the payload is visible to the child).

Impact

Silent failure for any custom (non-OpenAI Responses) provider: multi-agent verification/parallel auditing is unusable, and the failure is only visible by inspecting child rollouts (~12 minutes lost in our run before falling back).

Workaround (verified on the same machine, same profile)

Running a real separate process works:
codex exec -p <profile> "…" → exit 0, correct reply, new session id (01a09b34-…, 16.9 s wall). Independent processes are a usable substitute for sub-agent fan-out, and would be worth documenting in the multi-agent docs while this is unresolved.

Activity

  1. added
    bug
    CLI
    windows-os
    custom-model
    subagent
    on Sep 13, 2026
  2. ZhiHanyu-H57 commented on Sep 22, 2026

    @ZhiHanyu-H57

    Confirmation on Codex Desktop 26.915.31945 / codex-cli 0.155.0-alpha.9.2 (Windows) + one extra observation

    Reproduced again on a newer build. Version data point plus a recursion detail that I did not see covered above.

    Environment

    • Codex Desktop 26.915.31945, bundled codex-cli 0.155.0-alpha.9.2, Windows 11 / PowerShell
    • model = "deepseek-flash", model_provider = "deepseek"
    • [model_providers.deepseek]: base_url = "https://api.deepseek.com/", wire_api = "responses"

    Probe 1 — fork_turns="none"
    spawn_agent(task_name="probe_none_delivery", message="Reply with exactly: DELIVERY-NONE-OK", fork_turns="none")

    • Parent side: returned {"task_name":"/root/probe_none_delivery"}, no error.
    • Child side: never produced the token. It reported an empty payload and quoted the envelope it received:
    Message Type: NEW_TASK
    Task name: <recipient>
    Sender: <author>
    Payload:
    (empty)
    

    Note: on this run the <recipient> / <author> placeholders were not substituted in the child's rendering.

    Probe 2 — control with fork_turns="all"
    Same message with a full-history fork: the child likewise reported an empty payload and did not act on the message text.

    Extra observation — the failure is recursive
    In probe 2 the child spawned its own sub-agent (/root/probe_all_control/delivery_probe), and that grandchild also reported receiving no task body. So the broken delivery is not limited to depth 1; it propagates down the spawned tree.

    Impact in this session
    Three spawn attempts, zero usable child outputs. spawn_agent reported success each time and the parent sat waiting on agents that had nothing to do, until the child reports were inspected manually. Local mitigation: dispatch background work to an independent Codex process instead of spawn_agent (same shape as the codex exec workaround noted in this thread).

    Related: #36586 (code-level root cause + validated "multi_agent_version": "v1" workaround), #37237, #37822, #36321, #36493, and #46939 (config request for plaintext delivery).

    (The reproduction above was executed automatically by Codex running in that environment; the quoted child output is the child agent's own report.)

  3. rngt713-art commented on Oct 20, 2026

    @rngt713-art

    Adding the missing piece to the question in the first comment — "is encrypted_content expected to be
    decoded by the child runtime, and which public transport boundary owns the fix?"

    encrypted_content is not a valid content-part variant in the Responses API at all, so no provider
    can decode it. A vendor endpoint rejects it outright:

    POST https://api.deepseek.com/responses
    {"model":"deepseek-flash","stream":false,"store":false,
     "input":[{"role":"user","content":[
       {"type":"input_text","text":"Payload:\n"},
       {"type":"encrypted_content","encrypted_content":"ZEBRA-7731"}]}]}
    
    422 input: unknown variant `encrypted_content`, expected one of
        `input_text`, `output_text`, `input_image`, `input_file`
        (request_id 88018e63-842f-4b4a-aaf7-ee18cd27763f)
    

    Control — identical envelope, payload moved into the normal text part:

    200, and the model echoes the token verbatim: ZEBRA-7731
    

    For completeness: encrypted_content is valid as a field on reasoning items
    (include: ["reasoning.encrypted_content"] → 200, 38 chars). It is specifically the content-part use
    that is outside the schema.

    So the boundary that owns the fix is the client: expand the payload into a normal input_text part when
    handing the message to the child (or ship #46939's plaintext-delivery option). The child runtime cannot
    decode it, because the provider never receives it — and a third-party provider cannot be expected to
    accept a variant that isn't in the API it implements.

    Scope confirmation on a third-party gateway (2026-10-20). On this machine, 16/16 child rollouts from
    2026-10-14 → 2026-10-20 contain an "empty payload" complaint, and every child's rollout has exactly one
    role=user item — the environment block — with no task text and no parent history. It reproduces on
    both paths of the same gateway (Responses-native and chat-compat), so which upstream serves the
    request is not a variable. Combined with the [model_providers.deepseek] → https://api.deepseek.com/
    confirmation above, the official endpoint is not a workaround either.

    Environment: Codex desktop 26.1013.4894.0, bundled codex-cli 0.163.0-alpha.10.2, Windows 11,
    model_provider = opencode (wire_api = responses).

    Related: #40069 (same symptom on the desktop app), #46939 (plaintext delivery — the control above shows
    it would work).

  4. chenke6950 commented on Nov 5, 2026

    @chenke6950

    Confirmed again on 2026-11-05 with Codex desktop, codex-cli 0.154.0, Windows, and a custom DeepSeek provider using wire_api = "responses".

    Spawned three subagents in parallel. All three spawn calls returned successfully with valid task names, but every child received only the workspace/rules context and replied asking for the concrete task. No error was surfaced to the parent.

    Reproduction:

    1. Configure a custom Responses-compatible provider with multi_agent_version = "v2".
    2. Spawn multiple subagents with detailed task bodies.
    3. The parent observes normal completion of the spawn call.
    4. Each child sees the message envelope and Payload:\n, but the actual body is absent from visible content; the task text is carried as encrypted_content.
    5. Children respond as if no task was supplied, for example: “Received the project rules. Please tell me the concrete task.”

    This reproduced 3/3 times. The same provider works for ordinary parent turns, so the failure is specifically at subagent task delivery. The current workaround is to externalize the full task into a workspace file and send only a short file pointer.

    Suggested behavior for non-OpenAI providers: deliver the task as plain input_text, or include plain text alongside encrypted_content when the target provider cannot decode it.

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

    CLIbugcustom-modelsubagentwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions