Skip to content

Add Orchestrator/delegate mode such that the main agent is strictly read-only #18105

Closed

Description

@Raylinkh

What variant of Codex are you using?

CLI

What feature would you like to see?

Main agent has the tendency to do everything by itself, especially after context fills up, even explicit instructions and agents.md do not prevent the behaviour.

It is observed that when main-agent delegates effectively, tasks are done better and more efficiently, however, it is not straightforward in codex to enforce this behaviour because subagents inherit permissions from main agent. For claude code, hooks can be used with agent_id to identify subagent, but in codex there is no such arg apparently.

Additional information

No response

Activity

  1. added
    enhancement
    on Apr 16, 2026
  2. added
    CLI
    subagent
    on Apr 16, 2026
  3. changed the title [-]Add Orchestrator/delegate mode such that main agent is trictly read-only[/-] [+]Add Orchestrator/delegate mode such that the main agent is strictly read-only[/+] on Apr 16, 2026
  4. github-actions commented on Apr 16, 2026

    @github-actions
    Contributor
  5. removed
    CLI
    on Apr 16, 2026
  6. CarlChaaya commented on Apr 16, 2026

    @CarlChaaya

    I agree this is the better thread to consolidate into.

    A few concrete requirements from #18193 that may be useful to fold into this request:

    • The main value is not just that the orchestrator should delegate more often, but that repos should be able to opt in to treating active workflow/skill routing as sufficient delegation intent.
    • In that opt-in mode, Codex should be able to read repo-local orchestration rules from sources like AGENTS.md, skills, and .codex/config.toml, then decide that a task is in orchestration territory without the user having to separately say "use subagents".
    • When that happens, Codex should preferentially select matching project-scoped custom agents from .codex/agents/*.toml rather than falling back to generic workers.
    • The delegation should remain explainable. For example, the UI/logs should make it clear why a given agent was spawned and which workflow rule caused it.
    • This should remain opt-in and bounded by repo/runtime limits like thread/depth caps.

    So from my perspective, the missing behavior is something like:

    1. Repo opts into delegation-aware orchestration.
    2. Active skill/workflow routes task to orchestrate.
    3. Main agent stays in orchestrator mode instead of absorbing the work.
    4. Matching custom agents are spawned automatically.
    5. The reason for the delegation is visible.

    Closing #18193 in favor of this issue.

  7. dylanbuchi commented on Apr 19, 2026

    @dylanbuchi

    Adding a narrower use case that seems worth preserving under this broader feature request.

    I use Codex in repo/workflow setups that rely heavily on bounded subagent use. The current requirement that I restate delegation permission in the prompt (for example: "use subagents when needed") is a real UX tax in those environments.

    What I want is not global default-on delegation. I want an explicit opt-in setting/profile/repo-level mode that allows bounded autonomous delegation for users and workflows that intentionally want it.

    A shape like this would cover my use case:

    • explicit: current behavior
    • workflow: allow delegation when repo/workflow instructions explicitly route the task to orchestration
    • auto: allow bounded sidecar delegation when useful

    Important constraints:

    • conservative depth/fanout limits
    • no duplicate parent-thread work after delegation
    • clear visibility in UI/history/logs about when Codex delegated and why
    • conservative handling around approvals and security-sensitive actions

    So from my side, this broader orchestrator/delegate request is the right umbrella issue, but I wanted to add that a first-class opt-in delegation policy/setting would already solve a lot of the day-to-day friction for subagent-heavy workflows.

  8. etraut-openai commented on May 31, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received enough upvotes, so I'm closing.

  9. Raylinkh commented on Jun 1, 2026

    @Raylinkh
    Author
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

    enhancementsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions