Skip to content

create_thread drops scoped user-consent provenance and lacks a parent-bound return channel #41706

Open

Description

@rbifulco

Codex app version

26.825.51511 (build 7377)

Subscription

Not checked; this appears unrelated to subscription tier.

Platform

Apple Silicon macOS (Darwin 25.6.0 arm64)

What is the issue?

Standalone tasks created by another Codex task with create_thread do not retain verifiable provenance for scoped user consent carried in the creation prompt. They also do not appear to receive a parent-bound capability for returning a result to the task that created them.

This is adjacent to, but narrower than, #33282. That issue covers inheritance of the sandbox and approval-policy tuple. This report concerns two additional capabilities needed for safe delegation even when fail-closed behavior is working as designed:

  1. Scoped action consent provenance. A user directly approved a narrow class of actions in the parent task (specific test runs and reset/deletion of service data belonging to the delegated task's isolated lane). The parent created a visible tracked task and repeated that exact scope in its create_thread prompt. When the child requested the exact destructive action, the approval reviewer correctly refused to treat prompt text as direct user consent. After the user repeated the same approval directly inside the child task, the same action was allowed.

  2. Parent-bound result delivery. A child instructed to return a sanitized status update to the exact task that created it can be prevented from using send_message_to_thread, because the recipient was supplied by orchestration text rather than directly authorized by the user in the child. Sanitizing content addresses disclosure content, but cannot establish recipient authorization.

The current behavior is security-preserving, but it leaves no typed, verifiable way to delegate narrow consent or to send a result back to the creator. Long-lived visible staff tasks can therefore deadlock until the user manually visits each task and repeats the same approval.

Steps to reproduce

Scoped consent

  1. In a parent Codex Desktop task, have the user explicitly approve a narrow action scope, for example: running a named test class and resetting only the delegated task's isolated service-data directory.
  2. From that parent, call create_thread to create a visible tracked task. Include the exact approved scope in the child prompt.
  3. In the child, request escalation for an action inside that exact scope.
  4. Observe that the approval reviewer does not accept the copied prompt text as direct user consent.
  5. Have the user repeat the same approval directly in the child task.
  6. Retry the same action and observe that it can proceed.

Parent return channel

  1. Create a child task with create_thread and instruct it to send a sanitized completion summary to the exact creating task.
  2. In the child, call send_message_to_thread for that parent task.
  3. Observe that the child may lack recipient authorization even though the destination is its creator.

What did you expect to happen?

create_thread should either support a typed, auditable delegation envelope or clearly surface fresh approvals in the child. A safe typed design could include:

  • an immutable createdBy / parentThreadId relationship;
  • a consent-grant reference tied to the original direct user event;
  • grants restricted by action, resource/lane, destination, expiry, and revocation;
  • a notify_parent capability whose only destination is the creating task;
  • enforcement that prevents the child from broadening any inherited grant.

This should not blindly copy all parent permissions. If scoped delegation is intentionally unsupported, the UI/API should instead pause creation or surface the needed approval directly to the user, and documentation should state that action-specific consent does not cross standalone task boundaries.

Additional information

True subagents and standalone tasks have different semantics: documented subagents inherit the parent's sandbox policy and permission mode, while create_thread creates a separate tracked task/chat. The separate-task model is useful for visible, long-lived delegated roles, but currently lacks an equivalent safe mechanism for narrow consent provenance and creator-only result delivery.

Related: #33282 (create_thread does not inherit auto-approval mode for worktree tasks).

No project names, filesystem paths, task IDs, or sensitive payloads are included in this report.

Activity

  1. added
    enhancement
    app
    app-server
    safety-check
    on Aug 30, 2026
  2. aeoess commented on Aug 31, 2026

    @aeoess

    Three things this leaves open that would change the shape of a fix.

    The deadlock also has a security consequence, not only an ergonomic one. If proceeding requires the user to open each task and repeat an approval, that creates pressure to widen the child's permissions instead. A narrow delegated grant may therefore be safer than making repeated approval the only workable path.

    notify_parent also leaves a separate question about what happens to the returned payload. Binding the destination answers who the child may send to, but not whether that content is resumed into the parent's model context or surfaced to the user as inert data. Those have different security properties.

    The non-broadening rule also needs to cover redelegation explicitly. If a child can itself call create_thread, it should be clear whether it may pass authority onward at all, and whether any grant it creates must remain within both its own authority and its permission to delegate.

  3. MeeeeeShell commented on Sep 12, 2026

    @MeeeeeShell

    +1 — I’m running into this regularly with a long-lived multi-agent workflow, and the current workaround is surprisingly disruptive.

    My setup has a coordinator/PM thread delegating work to persistent owner, reviewer, and execution threads. I deliberately keep sensitive actions narrowly scoped; for example, I may tell the PM that exact commit SHA abc123 is approved for CI.

    The PM can relay that exact approval to the execution/review thread, but the receiving thread correctly recognizes that the statement came from another agent rather than directly from me, so it refuses to treat it as authorization. I then have to manually visit that thread and copy/paste essentially the same approval:

    Exact commit abc123 is approved for CI.

    This can happen repeatedly across independent threads, even though the authorization is specific, auditable, and unchanged.

    I definitely would not want arbitrary agent-to-agent messages to acquire user authority. What would solve this cleanly is a first-class, verifiable delegation mechanism: a user authorization object/token tied to the originating user message and scoped to something like action + resource/SHA + destination/purpose, which an authorized coordinator could pass to another thread without being able to broaden it.

    In other words: preserve the security boundary, but let agents transmit proof of an existing narrowly scoped user authorization, rather than merely saying “the user approved this.”

    This would remove a substantial amount of manual copy/paste from multi-agent Codex workflows while actually making the authorization chain more explicit and auditable than it is today.

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

    appapp-serverenhancementsafety-check

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions