Skip to content

[Bug] GPT-5.6 Sol routes agent wait calls to unrelated functions.wait after spawn_agent #37113

Description

@Muelmue

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

26.730.61639

What subscription do you have?

ChatGPT Pro 20x

What platform is your computer?

Microsoft Windows NT 10.0.19044.0 x64

What issue are you seeing?

Codex App exposes two unrelated waiting tools:

  • collaboration.wait_agent, which waits for subagents
  • functions.wait, which waits for a previously started exec cell

After collaboration.spawn_agent succeeds, the coordinator is explicitly
instructed to call collaboration.wait_agent, but it sometimes emits
functions.wait instead, using arguments derived from the agent-wait request.

I observed two failure shapes.

Failure 1

Expected:

collaboration.wait_agent({"timeout_ms": 30000})

Actual:

functions.wait({"timeout_ms": 30000})

The call failed argument parsing because functions.wait requires an exec
cell_id. No agent wait was performed, and the child result was not collected.

Failure 2

One correct collaboration.wait_agent call first timed out normally. The next
intended agent wait was emitted as:

functions.wait({
  "cell_id": "30",
  "yield_time_ms": 30000,
  "max_tokens": 2000
})

The runtime returned:

exec cell 30 not found

No exec cell had been created. The coordinator then stopped without retrying.

This prevents reliable parent/subagent workflows even though the child was
created successfully and continued running.

What steps can reproduce the bug?

  1. Start a fresh Local task in Codex App.

  2. Select gpt-5.6-sol.

  3. Use a repository containing enough documentation for a read-only child
    review to take longer than one wait interval.

  4. Give the coordinator this instruction:

    Create one fresh-context, read-only subagent using collaboration.spawn_agent.
    
    After spawn succeeds, immediately call:
    collaboration.wait_agent with timeout_ms=30000.
    
    If the child has not completed, call the same collaboration.wait_agent again.
    Use only collaboration.wait_agent or collaboration.list_agents for agent
    status. Do not use terminal polling.
    
  5. Observe the tool call emitted after collaboration.spawn_agent.

In two fresh reproductions, the spawn succeeded, but the intended
collaboration.wait_agent call was eventually or immediately replaced by
functions.wait.

One affected session ID:

019fcfe5-5c94-7772-b82b-07890d0b1e43

No token-limit or context-window warning was shown. One reproduction failed
immediately after spawn in a fresh task.

What is the expected behavior?

After a successful collaboration.spawn_agent call, an explicitly requested
agent wait must call:

collaboration.wait_agent({"timeout_ms": 30000})

If the wait times out, subsequent waits must continue to call
collaboration.wait_agent.

functions.wait must only be selected when an actual exec command has returned
a real exec cell_id. Agent-wait arguments must never be routed to that tool.

Additional information

The problem was reproduced in two unrelated repositories.

  • The first reproduction occurred without loading the repository's reusable
    workflow Skill.
  • The second occurred in a repository where the same native parent/subagent
    pattern had historically worked reliably.
  • Both repositories passed frozen snapshot checks.
  • collaboration.spawn_agent succeeded in both cases.
  • No files were modified.
  • No dependency installation, network access, or Git write occurred.
  • Prompt safeguards detected the wrong tool and stopped without retrying.

Historical successful runs in the control repository recorded:

codex-cli 0.146.0-alpha.3.1

One failing reproduction recorded:

codex-cli 0.147.0-alpha.1.2

The problem still reproduced after updating Codex App to 26.730.61639.

This suggests a possible tool-identity or schema-routing collision between
collaboration.wait_agent and functions.wait. Black-box evidence cannot
determine whether the exact owning layer is model tool selection, the agent
runtime, or Codex App tool registration.

Related but apparently distinct issues:

Sanitized rollout excerpts can be provided if needed. Full rollout files are
not attached because they contain private local paths and repository context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingmodel-behaviorIssues related to behaviors exhibited by the modelsubagentIssues involving subagents or multi-agent featurestool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions