Skip to content

Tool-backed subagents silently inherit Sol Ultra instead of custom agent model settings #32587

Open

Description

@ayato-fujiwara

What version of the Codex App are you using (From “About Codex” dialog)?

Codex App 26.707.51957 (build 5175), embedded codex-cli 0.144.0-alpha.4

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

In the Codex App, a parent session running gpt-5.6-sol / ultra silently spawns every tool-backed multi-agent v2 child I inspected with the same model and effort, even when the intended custom agent is configured for a different model.

For example, I have a valid personal custom agent at ~/.codex/agents/explorer.toml with:

name = "explorer"
description = "Read-only explorer for bounded code investigations."
model = "gpt-5.6-luna"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """
Perform bounded read-only exploration and return evidence.
"""

The exposed spawn_agent tool in this session only accepts task_name, message, and fork_turns. It does not expose agent_type, model, or reasoning_effort.

Even when I use the exact custom agent name as task_name: "explorer" with fork_turns: "none", the child rollout records:

  • session_meta.payload.source.subagent.thread_spawn.agent_role: null
  • turn_context.payload.model: "gpt-5.6-sol"
  • turn_context.payload.effort: "ultra"

Creating a custom default agent pinned to Luna High did not change the result. Trying to apply a model override to the already-created child was rejected with:

direct app-server input is not allowed for multi-agent v2 sub-agents

This looks like a runtime/tool-schema mismatch rather than an unavailable-model problem: a separate codex exec control run with -m gpt-5.6-luna and model_reasoning_effort="high" correctly recorded Luna High.

The silent fallback is especially problematic because it causes unexpectedly high Sol Ultra usage while the parent believes it delegated work to cheaper role-specific workers.

What steps can reproduce the bug?

  1. Start a Codex App task with the main model set to gpt-5.6-sol / ultra.
  2. Add a valid custom agent under ~/.codex/agents/explorer.toml with model = "gpt-5.6-luna" and model_reasoning_effort = "high".
  3. Ask the main task to start that exact custom agent. The tool call available in my session is:
{
  "task_name": "explorer",
  "fork_turns": "none",
  "message": "Model-routing probe. Do not use tools; reply with one fixed marker."
}
  1. Wait for the child to finish.
  2. Inspect the child's saved rollout session_meta and turn_context.
  3. Observe that agent_role is null and the child is gpt-5.6-sol / ultra, not gpt-5.6-luna / high.
  4. Repeat with a custom default agent pinned to Luna High. The child still inherits Sol Ultra.
  5. As a control, run codex exec -m gpt-5.6-luna -c 'model_reasoning_effort="high"'; the resulting rollout correctly reports Luna High.

Session IDs:

  • Parent: 019f4b1b-04e4-7290-b2e8-89b6ddac2827
  • Exact-name explorer child: 019f5691-6847-7131-804c-a25831f21b12
  • Custom-default probe child: 019f5693-6585-75c3-af75-9fcbba7f3072
  • Explicit Luna High CLI control: 019f5696-2dbb-7632-b3a6-6069f62f19fa

What is the expected behavior?

A tool-backed subagent launch should do one of the following:

  1. Expose agent_type, model, and reasoning_effort so the caller can select the registered custom agent or explicit model settings.
  2. Resolve an exact registered custom-agent name and apply that agent's model, model_reasoning_effort, instructions, and sandbox.
  3. If the surface cannot support role/model overrides, fail explicitly before starting the child instead of silently inheriting the expensive parent model.

The child activity UI and saved rollout should also make the actual model and reasoning effort clear.

Additional information

Impact: all workers intended to run as Luna High, Luna xhigh, Sol Medium, or Sol High can silently become Sol Ultra. This increases usage substantially and makes role-based orchestration unreliable.

Current workaround: avoid the in-app spawn_agent path, launch an independent codex exec worker with explicit model/effort/sandbox and agents.max_depth=0, then verify the saved rollout's turn_context. This loses first-class in-app subagent orchestration and is not an adequate long-term replacement.

Activity

  1. added
    bugSomething isn't working
    subagentIssues involving subagents or multi-agent features
    on Jul 12, 2026
  2. carltonawong commented on Jul 12, 2026

    @carltonawong

    FYI, we put together a scoped, reversible workaround for this exact Sol Ultra → child-routing failure:

    https://github.com/carltonawong/sol-ultra-workaround

    It keeps Sol Ultra as the root, uses isolated Terra High default children, limits fan-out, and treats completed children as terminal because follow-ups can drift back to Sol. It includes installer/verification steps and the caveats. Feel free to copy pieces or use it as inspiration — it is experimental, not an official quota control.

  3. dimitarvdenev commented on Jul 13, 2026

    @dimitarvdenev

    Confirmed independently on Codex CLI 0.144.1. The current tool-backed spawn_agent schema exposes only task_name, message, and fork_turns; it does not expose agent_type, model, or reasoning effort. A child named after a registered role has agent_role: null and inherits the parent model, effort, and sandbox. In contrast, a control run with explicit registered-role selection applied the role’s configured model, effort, and read-only sandbox. This confirms a surface/schema-routing gap rather than invalid custom-agent configuration.

  4. ricardolx commented on Jul 13, 2026

    @ricardolx

    MultiAgent V2 custom-agent routing reproduction

    I reproduced this on Codex CLI 0.144.3 in a tool-backed MultiAgent V2 session.

    The project contains a valid custom agent at .codex/agents/reviewer_scoped.toml:

    name = "reviewer_scoped"
    model = "gpt-5.6-luna"
    model_reasoning_effort = "xhigh"
    sandbox_mode = "read-only"

    The project skill explicitly instructs Codex to use reviewer_scoped. However, the exposed collaboration.spawn_agent schema only accepts:

    task_name
    message
    fork_turns
    

    It exposes no agent_type, custom-role selector, model, or reasoning-effort field.

    I ran two controls:

    1. Spawned a fresh child with task_name: "reviewer_scoped" and fork_turns: "none".
    agent_path: /root/reviewer_scoped
    agent_role: null
    model: gpt-5.6-luna
    effort: high
    

    The task name became only the child path. The configured role was not selected, and the configured xhigh effort was not applied.

    1. After the parent was running as gpt-5.6-terra / high, I started three team-review workers whose prompts explicitly requested reviewer_scoped.

    All three recorded:

    agent_role: null
    model: gpt-5.6-terra
    effort: high
    

    This demonstrates that the children inherit the live parent model and effort rather than loading .codex/agents/reviewer_scoped.toml. Prompting for the custom agent and matching its name through task_name do not bind the configured role.

    Expected:

    agent_role: reviewer_scoped
    model: gpt-5.6-luna
    effort: xhigh
    

    Actual:

    agent_role: null
    model/effort: inherited from parent
    

    This appears to be the same MultiAgent V2 schema/routing problem described in #31814, and #32782.

    The closed #26363 should not be treated as resolving this V2 behavior: PR #26599 explicitly restored selector visibility for V1 while retaining the hidden-metadata behavior for V2. The currently documented custom-agent configuration remains inaccessible through the default V2 collaboration.spawn_agent surface.

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

    appIssues related to the Codex desktop appbugSomething isn't workingsubagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions