Skip to content

Custom-provider subagents lose dynamic task payload on stable v0.146.0 — supported behavior or bug? #35932

Description

@ZhongXinlin

Summary

On the current stable standalone CLI, a native subagent configured with a non-OpenAI custom provider is created, but does not receive the dynamic task payload supplied to spawn_agent. The same payload is delivered correctly to a default same-provider control child, and the custom provider's direct Responses API is healthy.

This may be a bug in the custom-provider native-subagent path, or an intentional unsupported design that needs an explicit error and documentation. Either way, the present behavior is silent task loss.

Related: #17598. I am filing this separately because the failure is confirmed on the released stable CLI and because the capability contract is still ambiguous.

Environment

  • macOS
  • Standalone codex-cli 0.146.0 (@openai/codex@0.146.0; npm latest tag)
  • Parent model/provider: OpenAI gpt-5.6-sol
  • Child profile: MiniMax-M3 through a non-OpenAI custom provider
  • Provider transport: wire_api = "responses"
  • Native multi-agent feature enabled

Sanitized provider configuration:

[model_providers.minimax]
name = "MiniMax"
base_url = "https://api.minimax.io/v1"
wire_api = "responses"

[model_providers.minimax.auth]
command = "<redacted command-backed token helper>"

Minimal reproduction

From a fresh codex-cli 0.146.0 session, ask the OpenAI parent to make exactly one native spawn_agent call:

task_name = "stable_minimax_probe"
agent_type = "minimax-worker"
fork_turns = "none"

Delegation-ID: stable-minimax-payload-20260729-A

Need: Sort these inline words alphabetically and return the count: juniper, amber, cobalt, dune.

Boundaries: Do not call tools. Do not read or write files. Do not spawn agents.

Deliverable: Return only the Delegation-ID, sorted comma-separated list, and count.

The custom child profile is configured to fail closed when it does not receive a complete envelope, so the expected first response must include the exact Delegation-ID.

Observed

The stable CLI parent completed its native spawn_agent call. The custom-provider child returned exactly:

TASK_PAYLOAD_MISSING

The parent rollout records the complete delegation message and a spawn_agent function call. Therefore, the message was accepted by the parent, but did not reach the child as usable task context.

A single followup_task attempt in the desktop-app path also produced unrelated text rather than the supplied Delegation-ID or task result.

Controls

  1. A direct stateless POST /v1/responses request to the same MiniMax provider/model returned an exact unique canary marker.
  2. A fresh default same-provider native child received an equivalent inline sorting task and returned the correct sorted list and count.
  3. The failure reproduced after installing the released stable 0.146.0, not only in the prior bundled alpha CLI (0.146.0-alpha.3.1).

These controls suggest that the failure is specific to Codex's native custom-provider child handoff, not provider reachability, authentication, or the MiniMax model itself.

Expected behavior / clarification requested

Please clarify one of these contracts:

  1. Supported: non-OpenAI custom providers can run native subagents. In that case, the full dynamic spawn_agent.message and followup_task.message must reach the child.
  2. Unsupported by design: Codex should reject the spawn with a clear, documented error before creating a child, rather than silently creating a child with no task payload.

Debug suggestions

Could maintainers compare the default-child and custom-provider-child paths at these boundaries?

  • Serialize and log the sanitized child bootstrap payload immediately before and after the provider-specific request builder. Confirm preservation of the dynamic message, developer instructions, and child/thread identifiers.
  • Trace spawn_agent.message and followup_task.message through the Responses-compatible custom-provider adapter. A field may be omitted, transformed, or attached only to the OpenAI route.
  • Verify that fork_turns = "none" still injects the explicit task envelope for custom providers; no inherited parent context should be required for this case.
  • Add an integration regression test with a fake non-OpenAI Responses provider that records the child request and returns the received Delegation-ID. Cover both initial spawn and follow-up delivery.
  • If the adapter cannot safely provide this capability, fail before child creation with a capability-specific error and document the restriction.

I can provide sanitized rollout timestamps and additional control outputs if they would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingcustom-modelIssues related to custom model providers (including local models)subagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions