Skip to content

Subagent can inject agent-authored queued content as role:"user" in parent thread #45456

Open

Description

@Xiiph

Description

An internal subagent can use codex queue targeting its parent/root thread as a fallback communication path. The queued agent-authored input is later delivered into the parent thread as canonical user input and persisted as role:"user".

This loses the original agent provenance and promotes agent-authored content into the same role used for human input.

Observed behavior

  • A subagent attempted to communicate with its parent thread.
  • The normal inter-agent messaging path was unavailable, so it used codex queue instead.
  • The queued item later started a parent-thread turn via the queue path.
  • The delivered message was persisted as role:"user".
  • No human sent that message.
  • The receiving model then responded to it as a new turn.

The queued representation and the later delivered user message were the same logical queued item, not independent submissions.

Why this matters

This is more than a UI attribution issue:

  • Provenance loss: the receiving thread no longer knows that the content originated from a subagent.
  • Authority escalation: agent-authored content is represented at user-message authority.
  • Spurious execution: delivery can wake the parent model and cause additional model/tool activity without new human input.
  • Stale delivery: queued progress/checkpoint messages may be delivered after the originating work has already completed.

Minimal reproduction shape

  1. Start a parent/root Codex thread with a subagent.
  2. Make the subagent communicate back to the parent when the normal agent-messaging mechanism is unavailable.
  3. Let the subagent use codex queue --thread <parent> --message <agent-generated text> as a fallback.
  4. Allow the parent thread to become eligible for queued delivery.
  5. Inspect the resulting parent-thread turn/message.

Actual

The queued agent-authored payload becomes user input in the parent thread and is persisted as role:"user".

Expected

Agent-authored cross-agent communication should retain explicit agent provenance and should never be promoted to human/user authority. If codex queue is intentionally user-input-only, internal agents should be prevented from using it as an inter-agent fallback.

Possible fixes include preserving sender/authority metadata through queue delivery, rejecting agent-originated use of user-input queue APIs, or routing agent-generated queue traffic through a distinct inter-agent message type.

No project identifiers, thread/message IDs, payload contents, logs, screenshots, or other private evidence are included in this report.

Activity

  1. added
    bug
    CLI
    subagent
    on Sep 14, 2026
  2. repowazdogz-droid commented on Sep 15, 2026

    @repowazdogz-droid

    Follow-up live reproduction for #45456.

    A real Codex child (01a0a594-04b7-7fe0-b2e0-f2d1abe02f6d) targeted parent 01a0a568-27d8-7ba2-83a0-c4d1164200fa and executed:

    CODEX_45456_PARENT_THREAD_ID=01a0a568-27d8-7ba2-83a0-c4d1164200fa zsh reproduce.sh

    The durable queue payload was:

    {"UserInput":{"content":[{"type":"text","text":"OMEGA_CHILD_PROVENANCE_CONTROL_20260915","text_elements":[]}],"client_id":"01a0a594-6b4d-79b3-b8e9-6da9f78ba57a"}}

    After delivery, the same item appeared in the parent rollout as:

    {"type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"OMEGA_CHILD_PROVENANCE_CONTROL_20260915"}]}}

    The corresponding event was UserMessage; the child client_id remained, but child-agent provenance did not.

    Relevant paths: session_queue_commands.rs:107-118, thread_queue_processor.rs:77-89, ext/queue/src/service.rs:265-274, and core/src/session/mod.rs:4804-4833. The queue’s user-message intent is explicit in service.rs:40,57 and thread_queue_processor.rs:311-318.

    Cross-thread provenance and authority have recurring prior discussion in #36843, #37995, #25458, and #30190; this proposed property is continuous with that design area, not novel.

    The source suggests role:"user" may be intended for genuine queue input. The design question is whether child callers should be admitted to that queue or whether origin should be preserved.

    Proposed property: agent-authored content should not cross the trusted user-input boundary without retaining agent provenance.

    This confirms provenance loss/reclassification across the queue-to-user-input boundary. It does not establish approval bypass, sandbox bypass, arbitrary privilege escalation, or security severity.

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

    CLIbugsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions