Sub-agent accepts task but returns handoff failure instead of requested payload

Open 💬 1 comment Opened Mar 27, 2026 by iharc-jordan

What version of Codex CLI is running?

codex-cli 0.118.0-alpha.2

What subscription do you have?

Unknown from session UI

Which model were you using?

Unknown from session UI

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Windows Terminal via WSL2
TERM=xterm-256color

What issue are you seeing?

A spawned sub-agent accepts the task and reaches a completed state, but it does not return the requested result payload.

In my case I intentionally used a trivial smoke test to verify sub-agent behavior, not to get a meaningful audit. I asked the main agent to spawn a domain_expert sub-agent and have it do a very small read-only UI/UX audit of the login page.

The sub-agent was created successfully:

  • task name: /root/login_uiux_smoke_audit
  • nickname: Euclid
  • related thread id: 019d3165-585b-70d3-acd6-419de0259541

The main session then waited for completion successfully, and list_agents showed the worker in a completed state. But instead of returning the requested short audit, the worker's completion text was effectively a handoff failure message saying:

The sub-agent handoff did not complete normally in this run. It accepted the task envelope, but it never returned the requested audit payload back into the session...

So the sub-agent appears to run, but the result delivery/handoff back to the parent session fails.

What steps can reproduce the bug?

  1. Start a normal Codex CLI session in a repo.
  2. Ask the agent to do a minimal sub-agent smoke test, for example:
  • spawn a domain_expert sub-agent
  • give it a tiny read-only task
  • keep scope deliberately narrow so this is not a content-quality issue
  1. Example task used:
  • review only two login-related files
  • return 2-3 quick observations and 1 improvement suggestion
  1. The main agent calls spawn_agent(...) successfully.
  2. The main agent waits with wait_agent(...).
  3. The worker reaches a completed state.
  4. Inspect the worker via list_agents(...) or the returned completion payload.

Observed result:

  • the sub-agent does not return the requested audit/result
  • instead it returns a meta-level handoff failure message saying it accepted the task but never returned the payload
  • repro thread id: 019d3165-585b-70d3-acd6-419de0259541

What is the expected behavior?

If a sub-agent is spawned successfully and reaches completion, its final payload should contain the requested task result so the parent session can synthesize it normally.

For this test, I expected a tiny audit response from the domain_expert worker, not a handoff-failure/meta message.

Additional information

This looked like a real sub-agent plumbing/result-delivery problem rather than a task-quality problem because:

  • the task was intentionally trivial
  • the worker existed and completed
  • the failure happened at result return/handoff time

The task used for repro was read-only and made no file edits.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗