Skip to content

[Bug] Subagent task messages never delivered to spawned agents; agents idle or act on inherited context (Windows desktop app) #40069

Open

Description

@suizhejiu

What version of the Codex App are you using (From “About Codex” dialog)?

26.818.3698.0 (package: OpenAI.Codex_26.818.3698.0_x64__2p2nqsd0c76g0)【需你确认:请以 About Codex 对话框显示为准,如有差异替换】

What subscription do you have?

其他

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

Spawned subagents never receive the task text passed via spawn_agent or followup_task. They either complete an onboarding turn and reply "waiting for task", or act only on the context inherited from the parent thread (recursively spawning their own subagents and running unrelated demos). A verbatim quote-back test failed: the agent did not repeat the given message and instead spawned more subagents. Observed in two independent conversations; symptom in the other chat was "subagent invoked but just watching/idle". No error message is shown.

What steps can reproduce the bug?

Feedback ID: 01a025b0-87c5-72a0-ab34-d0e3e2858267

What is the expected behavior?

Per official docs (https://developers.openai.com/codex/subagents), a spawned agent should receive the task text in its own thread and execute it, and its result should return to the parent. Actual behavior: the task text never appears in the agent's visible conversation; agents idle or act on inherited context.

Additional information

Activity

  1. added
    app
    on Aug 22, 2026
  2. added
    bug
    windows-os
    subagent
    on Aug 22, 2026
  3. Avolt-7 commented on Oct 12, 2026

    @Avolt-7

    Confirming this on a third-party Responses-compatible endpoint (DeepSeek), with a root-cause detail that may help narrow the fix.

    Environment: Codex desktop app 26.1007.21434 / codex-cli 0.162.0-alpha.17.2, Windows 10.0.26200 x64; API-key auth (no ChatGPT sign-in) with a custom provider: [model_providers.deepseek], base_url = https://api.deepseek.com/, wire_api = "responses". Model catalog declares "multi_agent_version": "v2" for both models.

    The parent's spawn_agent call carries the full task text:

    {"task_name":"sub_a_md","message":"Count .md files under <workspace> recursively. Read-only statistics, do not modify files."}

    The subagent thread is created correctly (thread_source=subagent, agent_path=/root/sub_a_md, correct parent_thread_id), but its incoming message delivers the body as encrypted_content, so the model only sees the envelope:

    [{"type":"input_text","text":"Message Type: NEW_TASK\nTask name: /root/sub_a_md\nSender: /root\nPayload:\n"},
     {"type":"encrypted_content","encrypted_content":"Count .md files under <workspace> recursively..."}]

    The subagent then replies "I don't see a task yet in this thread - just the workspace context", which matches the "waiting for task" behavior reported above.

    A/B control: the identical prompt with CODEX_HOME pointed at a ChatGPT-signed-in home delivers the task as plain input_text, and both subagents complete correctly. So the failure looks specific to the non-OpenAI Responses path, where the encrypted payload cannot be decoded.

    Suggested fix: fall back to plain input_text delivery (or attach plain text alongside encrypted_content) when the provider is not OpenAI.

  4. rngt713-art commented on Oct 20, 2026

    @rngt713-art

    Same symptom on Codex desktop 26.1013.4894.0 (bundled codex-cli 0.163.0-alpha.10.2), Windows 11,
    against a third-party gateway (wire_api = responses): the parent's spawn_agent returns
    {"task_name":"/root/…"} with no error, and the child reports an empty payload.

    Numbers from this machine: 16/16 child rollouts from 2026-10-14 → 2026-10-20 contain an "empty payload"
    complaint, and every child rollout has exactly one role=user item — the environment block — with no
    task text and no inherited history. Children therefore improvise from the workspace (one read a
    HANDOFF.md and continued the mainline work; another went off to re-run an unrelated probe).

    Root cause and a control are in #45233: the payload is carried in a {"type":"encrypted_content"}
    content part, and that variant is not in the Responses schema — a provider rejects it with
    422 unknown variant 'encrypted_content', expected one of 'input_text', 'output_text', 'input_image', 'input_file'. The same envelope with the payload in input_text returns 200 and the model echoes the
    token verbatim, so the fix is client-side (expand to a text part, or ship #46939).

    One impact worth adding to the list: a child with no task has no completion criterion, so it can keep
    running after the parent turn ends. In our case the child started its own investigation and kept going;
    the only way to stop it was to quit the app entirely. interrupt_agent from a later turn would have
    helped, but nothing in the UI indicates the agent is running unattended on an empty task.

  5. chenke6950 commented on Nov 15, 2026

    @chenke6950

    Still reproducible on 2026-11-15 with Codex desktop 26.1106 (build 26605; bundled codex-cli 0.167.0-alpha.4.1) on Windows, using a custom DeepSeek wire_api = "responses" provider.

    I ran a minimal delivery probe with no inherited parent history (fork_turns = none). The spawn_agent message contained exact file paths and a unique nonce. The child never saw the paths, task, or nonce. Its entire response was: “已载入当前工作区的项目规则。请告诉我这次要做的任务。” (“Project rules loaded. Please tell me the task for this turn.”) It did not create the requested report file.

    This matches the encrypted_content / empty Payload: diagnosis above. I also checked the public changelog for 0.168.0: it lists #58829 (Accept agent follow-ups through native turn input delivery) and #58988 (Respect delivery boundaries for injected agent messages), but the release notes do not explicitly state that the custom-provider encrypted_content case is fixed. I have not yet tested 0.168/0.169 because the installed desktop build still reports CLI 0.167.0-alpha.4.1.

    If those commits are intended to address this issue, a confirmation would help; otherwise the bug remains reproducible on 26.1106.

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

    appbugsubagentwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions