Skip to content

[Bug] Codex native subagent completion can surface as no-output/null despite completed child result #91120

@jinon86

Description

@jinon86

[Bug] Codex native subagent completion can surface as no-output/null despite completed child result

Summary

On OpenClaw 2026.6.1, a Telegram-sourced parent agent spawned two Codex native subagents via multi_agent_v1.spawn_agent. Both completed, but the parent received unreliable completion payloads:

  • one child had a valid completed text available through wait_agent, but the internal completion event delivered to the parent surfaced as (no output);
  • another child completed with completed: null.

This causes the parent/finalizer to treat useful delegated work as missing, or to proceed without evidence. It is especially harmful for A2A/A2AD work because the finalizer depends on child evidence packets.

Environment

Observed run

Child 1

  • Agent id: 019ea125-d663-7672-a22d-76170e1d8aa9
  • Nickname returned by spawn: Heisenberg
  • Task: Team2 research note for A2A hybrid worker/subagent mode
  • Parent initially received internal completion as no-output.
  • Later multi_agent_v1.wait_agent returned a full completed text with the expected Team2 research note.

This suggests the child produced output, but at least one parent notification/delivery path lost or failed to surface it.

Child 2

  • Agent id: 019ea126-1209-73f0-9200-887498129280
  • Nickname returned by spawn: Bacon
  • Task: Team2 skeptic/validator review for the same A2A hybrid proposal
  • Parent initially received internal completion as no-output.
  • Later notification and multi_agent_v1.wait_agent showed completed: null.

This suggests either the child never persisted final text, the final text was lost during cleanup, or the parent cannot distinguish "child completed with no assistant final" from "delivery failed".

Additional diagnostic notes

openclaw.sessions_history could not inspect either native subagent session:

No session found: codex-thread:019ea125-d663-7672-a22d-76170e1d8aa9
No session found: codex-thread:019ea126-1209-73f0-9200-887498129280

openclaw.subagents also did not list these native subagents as recent, which makes post-incident diagnosis dependent on multi_agent_v1.wait_agent and transient notifications.

Expected behavior

For Codex native subagents:

  1. If the child produced final text, every parent completion notification should include the same final text or a stable retrievable result reference.
  2. If the child completed with no final assistant text, the parent should receive a typed reason such as completed_without_final_message, not ambiguous (no output) or completed:null.
  3. The parent should be able to inspect a sanitized child transcript/result by stable id, or the completion event should include enough diagnostic metadata to determine where output was lost.
  4. The native subagent bridge should not allow an internal completion event to report no-output while wait_agent can later retrieve non-empty completed text.

Why this matters

This is user-visible in Telegram/A2A operation:

  • The finalizer may ignore valid subagent research.
  • The broker may create duplicate work because it believes a worker produced nothing.
  • A2AD thesis/antithesis/finalizer workflows lose their evidence chain.
  • Repeated "empty child output" incidents cannot be root-caused from OpenClaw session history.

Suggested prevention

  • Normalize native subagent completion payloads through one durable result source.
  • Persist completed text before cleanup and make all notification paths read from that frozen result.
  • Add a typed no-output status with reason and minimal metadata.
  • Make sessions_history or an equivalent diagnostic tool resolve native codex-thread:<id> sessions/results.
  • Add a regression test where one child returns a non-empty final and another exits without a final assistant message; parent notifications and wait_agent should agree in both cases.

Acceptance criteria

  • Repro creates two native subagents; parent notification and wait_agent return identical result states.
  • Non-empty child output is never surfaced to the parent as (no output).
  • completed:null includes a machine-readable reason.
  • A diagnostic path exists for native subagent ids after completion.
  • Existing related issue Bug: native subagent completion output not delivered to parent agent (delivery_status stuck on 'pending') #78656 is either linked as prior fixed path or this issue is closed as a confirmed duplicate only after the 2026.6.1 multi_agent_v1 path is covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions