Repository navigation
Description
Environment
codex-cli 0.154.0(npm install), Windows 11 x64, interactive TUI (originator: codex-tui)- custom model provider profile, launched with
-p <profile>(model_provider: deepseek,wire_api = "responses", modeldeepseek-flash) - Related existing reports: Subagent task payload invisible to custom non-OpenAI providers (DeepSeek): encrypted_content block dropped with multi_agent_version v2 #36586,
spawn_agentsilently creates empty sub-agents for any non-OpenAI Responses provider — task body sent asencrypted_contentand dropped, with zero diagnostics #37237, spawn_agent / followup_task message payload never reaches the sub-agent (encrypted_content is dropped) #37822, [Bug] spawn_agent/followup_task/send_message: child agents receive empty task payload (multi-agent v2, 0.146.0-alpha.9.2) #36321,0.147.0-alpha.4: OpenAI parent still sends encrypted V2 task to non-OpenAI child after #35845 #36376. This issue adds a confirmation on 0.154.0 stable (earlier reports were on 0.145.0 / 0.146.x / 0.147.0-alpha) plus a verified workaround.
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_taskretries (3 messages) and a one-line probe produced the same envelope shape.- Two
wait_agentcalls timed out (300 s and 420 s). spawn_agentnever returned an error, so the parent kept waiting for agents that could not act.
Expected
- The spawn task and any
followup_taskpayload 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
ZhiHanyu-H57 commentedon Sep 22, 2026
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
26.915.31945, bundledcodex-cli 0.155.0-alpha.9.2, Windows 11 / PowerShellmodel = "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"){"task_name":"/root/probe_none_delivery"}, no error.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_agentreported 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 ofspawn_agent(same shape as thecodex execworkaround 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.)
rngt713-art commentedon Oct 20, 2026
Adding the missing piece to the question in the first comment — "is
encrypted_contentexpected to bedecoded by the child runtime, and which public transport boundary owns the fix?"
encrypted_contentis not a valid content-part variant in the Responses API at all, so no providercan decode it. A vendor endpoint rejects it outright:
Control — identical envelope, payload moved into the normal text part:
For completeness:
encrypted_contentis valid as a field on reasoning items(
include: ["reasoning.encrypted_content"]→ 200, 38 chars). It is specifically the content-part usethat is outside the schema.
So the boundary that owns the fix is the client: expand the payload into a normal
input_textpart whenhanding 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=useritem — the environment block — with no task text and no parent history. It reproduces onboth 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, bundledcodex-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).
chenke6950 commentedon Nov 5, 2026
Confirmed again on 2026-11-05 with Codex desktop,
codex-cli 0.154.0, Windows, and a custom DeepSeek provider usingwire_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:
multi_agent_version = "v2".Payload:\n, but the actual body is absent from visiblecontent; the task text is carried asencrypted_content.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 alongsideencrypted_contentwhen the target provider cannot decode it.