Skip to content

[Feature Request] Per-thread Auto mode that routes both model and reasoning effort #34278

Open

Description

@jack1231222

Maintainer triage summary — 2026-08-01

Observed behavior

  • On macOS, a third-party prototype could not atomically update both model and reasoning effort before submission. An app-server shim caused Error submitting message and was removed.
  • In an independent Windows reproduction with no model/effort pins, trivial and complex tasks all remained on gpt-5.6-sol; spawned workers remained on Sol with medium reasoning.
  • The current subagent documentation says that unpinned model/effort settings can be selected based on task needs, while observed Desktop behavior appears to inherit the current/default route. The intended scope is unclear.

Maintainer decision requested

  1. When Desktop/app-server starts a turn without explicit model and effort values, is the intended behavior task-aware selection or thread/default inheritance?
  2. Is there, or is there a plan for, a supported atomic pre-submit operation that:
    • applies both model and reasoning effort;
    • preserves the draft and attachments;
    • creates exactly one user message and one turn;
    • exposes the effective route in transcript/app-server truth; and
    • fails before submission if the route cannot be applied?
  3. If a complete Auto mode is not currently planned, would the team consider a staged implementation:
    • Stage A: expose the effective model, effort, and selection reason;
    • Stage B: provide an atomic set-next-turn route operation;
    • Stage C: provide native per-thread Auto with user-defined model/effort bounds?

Cross-surface relevance

The same contract affects Desktop, CLI, IDE, app-server clients, and subagents. Related requests: #8649, #20855, and #26996. Independent Windows evidence is linked in the comments below. Documentation clarification: #36422.


What variant of Codex are you using?

Codex Desktop on macOS. The same capability would also be useful in the CLI and IDE extension.

What feature would you like to see?

Summary

Add a per-thread Auto mode that chooses both the model and reasoning effort before each turn.

With GPT-5.6 Sol, I built a local macOS prototype called Codex Auto to explore this workflow. The user selects 1–5 permitted models and the allowed effort tiers for each model. Before a turn starts, the router makes two separate decisions:

  • Model: based on judgment difficulty, ambiguity, risk, and prior failures.
  • Reasoning effort: based on execution scope, verification burden, depth, and parallel work.

The selected model and effort should be visible in Codex's native selector, with a short reason. Manual selection must always win.

Why this is needed

Real Codex work is not uniformly difficult. A single thread can move between:

  • mechanical edits, searches, formatting, and running known commands;
  • normal multi-file implementation;
  • unknown-root-cause debugging, architecture, migration, privacy, or security decisions.

A fixed model/effort combination creates two expensive failure modes:

  1. Over-allocation: a frontier model at high effort spends unnecessary tokens and latency on simple work.
  2. Under-allocation: a weaker model or low effort misses hidden complexity, causing retries, larger patches, more review, and more total token usage.

The useful metric is not the price of one turn. It is total task-completion cost: tokens + latency + retries + review + risk. An Auto mode should downshift routine work and upshift when uncertainty or consequences justify it.

This should materially reduce wasted tokens in suitable workloads, but the product should measure it with controlled evaluations instead of advertising an unverified savings percentage.

Proposed UX and safeguards

  • Per-thread Auto toggle, off by default.
  • User-selected pool of 1–5 models; Auto never escapes that pool.
  • Per-model allowlist/min/max for reasoning effort; Ultra requires explicit opt-in.
  • Quality, balanced, and speed policies.
  • Model and effort are routed independently.
  • Native selector always displays the effective model and effort.
  • A short, inspectable reason is shown for the current turn.
  • Manual override/pin is authoritative.
  • Hysteresis prevents rapid oscillation, but cannot override a risk floor.
  • No automatic rerun after tool side effects.
  • If the route cannot be applied atomically, keep the draft and attachments intact and do not silently send with the wrong settings.
  • Raw prompts, assistant text, attachments, and full paths are not required for persistent routing telemetry.

Prototype evidence and the important failure

The prototype currently has 334 passing automated tests:

  • 287 XCTest tests
  • 23 Swift Testing tests
  • 24 pytest/Hypothesis tests

They cover per-thread isolation, 1–5 candidate boundaries, per-model effort allowlists, manual override, fallback, privacy, native-selector readback, transcript verification, and single-admission safeguards.

The real Desktop test revealed the most important product boundary: a third-party extension does not currently have a supported, atomic pre-submit primitive for updating both model and effort. A transparent app-server shim could change the visible model, but real Desktop submissions then produced Error submitting message. I removed the shim and restored the official app-server path instead of presenting the prototype as production-ready.

That result is why this capability belongs in Codex itself rather than in a fragile third-party proxy.

Product primitive that would unblock this

A supported host-level operation, conceptually:

set_next_turn_route(thread_id, model, reasoning_effort, reason, policy_revision)

It should:

  1. validate the model/effort combination against the live catalog;
  2. apply the route before the user message becomes a turn;
  3. update the native selector;
  4. preserve the original message and attachments;
  5. create exactly one user message and one turn;
  6. expose the actual model/effort in the turn/transcript truth;
  7. return a clear failure without starting the turn when the route cannot be applied.

Codex itself could then supply the built-in policy, while an optional extension API could allow local/custom policies within user-defined caps.

Acceptance criteria

  • Auto can select different models and effort tiers on different turns in the same thread.
  • New threads remain native/off unless the user enables Auto.
  • The native selector and transcript agree with the effective route.
  • One submit produces one user message and one turn, including with attachments.
  • Manual overrides always win.
  • Routing failures never silently use an unintended model/effort.
  • Evaluation reports total completion cost and quality, not only per-turn token use.

Related

This proposal extends the same direction to joint model + effort routing, with per-thread user control and native Desktop synchronization.

Activity

  1. added
    enhancementNew feature or request
    appIssues related to the Codex desktop app
    app-serverIssues involving app server protocol or interfaces
    on Jul 20, 2026
  2. whatthecodemean commented on Jul 27, 2026

    @whatthecodemean

    Windows reproduction evidence from Codex Desktop supports this request.

    Environment:

    • Codex Desktop / app-server CLI runtime: 0.146.0-alpha.3.1
    • Windows, local projects
    • Global model and model_reasoning_effort keys absent
    • No per-task or per-agent model/effort overrides supplied

    Controlled test:

    1. New workflow, bounded configuration validation task.
    2. Existing workflow, trivial read/count task.
    3. Existing Git workflow, cross-layer diagnostic design task.
    4. Spawned worker asked only to calculate 2+3.
    5. Spawned worker asked for a compact multi-layer fault-analysis plan.

    Observed effective runtime route from session turn_context metadata:

    • All three top-level tasks: gpt-5.6-sol.
    • Both spawned workers: gpt-5.6-sol with medium reasoning.

    No model downshift or effort change occurred between the trivial and complex samples. In this build, leaving the route unpinned behaved as default-model inheritance, not complexity-based routing.

    There is also a workflow continuity boundary for Git projects: a fresh Codex worktree is created from the committed baseline, so uncommitted routing guidance in the source working directory is not visible to the new task.

    The requested native primitive should therefore cover both model and effort, apply before admission of each turn, and expose the effective route in transcript/session truth. It should also support:

    • legacy-route migration into the current GPT-5.6 family by workload role;
    • phase-boundary reassessment within an existing thread;
    • manual override as authoritative;
    • user-defined model/effort caps and risk floors;
    • hysteresis to avoid route oscillation;
    • no automatic rerun after side effects;
    • privacy-preserving routing telemetry;
    • evaluation by total completion cost (quality, retries, latency, token usage, and failure cost), not per-turn price alone.

    A useful role-aware baseline would be Luna for deterministic/high-volume work, Terra for everyday implementation and bounded debugging, and Sol for ambiguous/high-consequence work, with reasoning effort selected independently.

    Could the team clarify whether unpinned routes are currently expected to perform any task-sensitive selection in Desktop, or only inherit the current/default Power route? A supported atomic set_next_turn_route(thread_id, model, reasoning_effort, reason, policy_revision)-style operation would make this implementable and auditable.

  3. whatthecodemean commented on Jul 27, 2026

    @whatthecodemean

    Follow-up with a sanitized local shadow implementation and validation result.

    I implemented a central, five-layer adaptive routing prototype for a large local workflow catalog:

    1. hard constraints and risk floors;
    2. independent model and reasoning-effort scoring;
    3. reassessment at phase/failure/contradiction/context/risk changes;
    4. immediate escalation plus evidence-gated de-escalation (hysteresis);
    5. budget governance that may defer admission but never silently crosses the selected quality/risk floor.

    The prototype remains read-only shadow routing. It does not modify workflows, invoke a model, or submit Codex turns.

    Sanitized validation snapshot:

    • 16 curated roots plus 42 trusted active registry roots, with 12 overlapping: 46 unique shadow-discoverable roots.
    • Deterministic stratified sample: 13 roots across deterministic content, software implementation, research/analysis, operations/diagnostics, and high-consequence strata.
    • Shadow routes: Terra/low 3, Terra/medium 3, Terra/high 3, Sol/high 4.
    • Task-admission smoke cases separately produced Luna/low for a deterministic count, Terra/medium for ordinary implementation, and Sol/xhigh for an irreversible production migration.
    • 26 unit/state-machine/privacy/sampling/transition tests passed.
    • Exact replay of all 13 sampled events produced 0 new decisions, 13 duplicate detections, no extra budget charge, and an unchanged state hash.
    • Public telemetry uses a strict allowlist: route, effort, confidence, layer outcomes, budget action, reasons, and a run-local numeric index only. It excludes workflow/case identifiers, paths, prompts, assistant text, and attachments.
    • Run identity and the final commit bind hashes for the sample, policy, router, runner, classifier, sampler, state, summary, and public decision log.

    Independent review found and the implementation corrected several failure modes: untrusted manual override injection, budget-driven route downgrades, incomplete total-budget enforcement, phase-change hysteresis leakage, archive/alias sampling pollution, unknown legacy-model crashes, deferred events becoming permanently ineligible, same-run duplicate charging, mode injection, and incomplete source binding.

    Important evidence boundary: this validates policy behavior, privacy, state transitions, stratified coverage, and idempotency. It does not yet prove better task quality, real token savings, or lower end-to-end completion cost, because shadow routing does not execute the selected model.

    The remaining blocker is still a supported atomic pre-submit host operation. A useful primitive would be equivalent to:

    set_next_turn_route(thread_id, model, reasoning_effort, reason, policy_revision)

    It would need to preserve drafts/attachments, create exactly one message and one turn, update the native selector, expose the effective route in transcript/session truth, and fail closed before submission. Without that boundary, a local router can recommend and audit a route, but cannot transparently and safely apply it to every ordinary Desktop turn.

  4. whatthecodemean commented on Jul 28, 2026

    @whatthecodemean

    Follow-up after checking the current public docs, Support, and adjacent usage/performance reports.

    There is now a documentation/behavior ambiguity that may explain why users expect task-sensitive routing but do not observe it in Desktop:

    • The current Subagents documentation says that, when model and model_reasoning_effort are not pinned, Codex can choose a setup balancing intelligence, speed, and price for the task, potentially favoring Terra for scans and a higher-effort GPT-5.6 configuration for demanding reasoning.
    • OpenAI Support case 12256212 stated that an unpinned Codex Desktop task uses the current/default selection and is not automatically re-routed per task or per turn; supported user controls are the picker, /model, or launch-time model selection.
    • In the Windows Desktop controlled sample already posted above, 0 model/effort pins still yielded Sol/medium for trivial and complex top-level work and for both trivial and complex spawned workers.

    Could maintainers clarify the intended contract?

    1. Is the task-sensitive statement limited to custom agent/subagent configuration, ChatGPT Work, or a staged rollout, rather than ordinary Desktop top-level tasks?
    2. When turn/start omits model and effort, does the app-server invoke a task-aware selector, inherit the thread route, or resolve the current global/default route?
    3. Can an existing thread ever reassess its route at a phase boundary, or is a fresh thread/subagent required?
    4. Can the transcript/app-server expose both the effective route and a machine-readable selection reason so users can distinguish native auto-selection from default inheritance?
    5. Is there a supported atomic pre-submit operation for applying both model and effort, or is this still unavailable?

    The cost side is also broader than model choice. Current open reports describe repeat compaction and reprocessing (#35032, #35226), loss of recoverable task state at usage exhaustion (#35784), and large weighted-usage differences from model/tool-call scheduling (#35050). This suggests that a useful native Auto contract should optimize total completion cost—quality, retries, model cycles, context growth, compaction, and recovery—not simply choose the cheapest model for one turn.

    A sanitized local five-layer controller now leaves all Codex model/effort fields unpinned and only controls admission, output budget, context thresholds, loop detection, and handoff. It passes 40/40 local tests, but it intentionally does not claim token savings and cannot prove native route adaptation without an observable selector contract.

  5. whatthecodemean commented on Jul 28, 2026

    @whatthecodemean

    Product architecture proposal: make Auto routing cheaper than the waste it prevents

    The discussion above identifies the host/API boundary. This follow-up describes the product architecture I would now request from OpenAI.

    A native Auto mode should not run a full frontier agent before every user turn. That could consume enough tokens and latency to erase the savings from routing. The routing layer should be a lightweight control plane with a strict overhead budget.

    Proposed hybrid design

    1. Deterministic local fast path

      • Extract only bounded features: task type, requested actions, file/scope count, context growth, tool requirements, failure history, reversibility, and risk.
      • Apply hard constraints, privacy rules, user caps, and risk floors without a model call.
      • Immediately route obvious low-risk or high-risk cases.
    2. Tiny semantic router for ambiguous cases

      • Use a distilled classifier or other small purpose-built model, not a general-purpose coding agent.
      • Return only structured output: demand class, confidence, recommended model family, effort range, and reassessment triggers.
      • The router could run locally in the client for privacy/latency, or server-side where OpenAI can use the current catalog, availability, price, and quality telemetry.
      • If server-side, routing overhead should not silently consume the user's primary Codex allowance. It should be platform overhead or separately visible and bounded.
    3. Native atomic admission

      • Apply model and reasoning effort before the message becomes a turn.
      • Preserve the draft and attachments.
      • Create exactly one user message and one turn.
      • Fail closed if the selected route cannot be applied.
    4. Event-triggered reassessment, not per-message analysis

      • Reassess at task start and only when phase, ambiguity, risk, context, validation burden, contradiction, or repeated failure changes materially.
      • Use hysteresis: escalate immediately when evidence requires it, but downshift only after stable evidence.
      • Do not attempt to predict the entire future task at admission. Use rolling reassessment at observable phase boundaries.
    5. Closed-loop evaluation

      • Optimize total completion cost: quality, retries, model cycles, cached/uncached input, output/reasoning, latency, compaction, validation, and recovery cost.
      • Compare the chosen route with privacy-safe shadow alternatives on a small sampled fraction.
      • Detect routing regret: a cheap route that causes retries can cost more than starting stronger; an expensive route that over-processes a mechanical edit is also a failure.

    Required user controls and observability

    • Auto model pool and per-model effort bounds.
    • Explicit quality/risk floor; Max/Ultra require opt-in.
    • Manual selection always wins.
    • Effective model, effort, route reason, confidence, and reassessment event visible in the UI and transcript/app-server truth.
    • Separate counters for routing overhead and task execution usage.
    • No persistent raw prompts, source text, attachments, or full paths in routing telemetry.
    • A zero-model fallback when the lightweight router is unavailable.

    Acceptance test

    Auto should demonstrate, on frozen representative tasks, that:

    routing overhead + routed completion cost < fixed-default completion cost

    while meeting the same quality and safety thresholds. Results should be reported by workload stratum rather than as one universal savings percentage.

    This architecture would make the feature practical for large workflow catalogs: model releases update the central capability/cost registry and router policy, instead of requiring users to manually edit every workflow. A local rules-only controller can approximate the safeguards today, but it cannot provide semantic routing or atomically apply the route without native product support.

  6. rjbarbour commented on Aug 5, 2026

    @rjbarbour

    This matches my day-to-day Codex workflow. I frequently change model and reasoning effort within the same thread as work moves between mechanical edits, investigation, architecture and verification. I currently have to open menus repeatedly, which makes it harder to manage latency, capability and token usage.
    My immediate need is direct manual control: an expandable routing tray beneath the composer with one-click segmented controls for model, reasoning effort and ⚡ Fast. That would already solve frequent in-thread switching and the plan-to-implementation hand-off.
    Auto should be opt-in and configured under Advanced, where users can choose the permitted model pool, allowed effort range, speed policy and any cost/latency constraints. When Auto is enabled, the normal tray should still show the effective choice for the next turn—for example Sol · Medium · Fast—plus a short reason such as “routine implementation task”. Selecting any manual control should provide an obvious override.
    The important UX principle is that Auto must be visible and inspectable, but it should not replace quick manual control or silently change the route.

    Image
  7. whatthecodemean commented on Sep 4, 2026

    @whatthecodemean

    Follow-up (2026-09-05): checked on Windows Desktop 26.901.4073.0. The agent-visible task controls now expose model and reasoning overrides, but their documented omission semantics are different: new tasks use the user's configured default; follow-up messages keep the existing task settings. Neither is evidence of complexity-sensitive Auto routing.

    For users with many existing tasks, the remaining practical gap is a supported reset-to-default/Auto operation that does NOT submit a prompt or start an inference run. Can maintainers identify an API or UI operation for this, including a conditional idle-only bulk update that skips running tasks and preserves drafts/attachments? Shared project/global config changes are not equivalent because they can affect active tasks.

    The current Subagents documentation now describes explicit spawn values, [agents] defaults, parent inheritance and custom-agent precedence: https://learn.chatgpt.com/docs/agent-configuration/subagents . This helps explain inheritance (related documentation issue #36422), but does not establish adaptive model+effort routing for ordinary existing Desktop tasks.

    No new routing benchmark or token-saving claim is being made here. We have not bulk-started tasks or edited the live task database to simulate this capability. A supported idle-task migration/reset contract and a way to read back the effective route would let users test this safely without manually changing hundreds of tasks.

  8. otikk commented on Sep 5, 2026

    @otikk

    Strong +1 for this direction. The key value is not simply having a stronger model available, but making Codex economically intelligent about when to use it.

    A practical workflow should look like this:

    • use a strong model only for architecture, ambiguous debugging, risky decisions, migrations, or escalation after failure;
    • route routine work such as repository search, mechanical edits, formatting, test execution, summaries, and straightforward implementation to a faster/cheaper model;
    • allow the system to move back up to the stronger model only when complexity or uncertainty actually requires it;
    • optimize for total task-completion cost (tokens + retries + latency + review), not model strength per turn.

    Ideally the user could just choose Auto / Fast / Deep, while Auto transparently routes model + reasoning effort within user-defined bounds.

    This matters especially because current hierarchical delegation can become additive instead of substitutive: see #41817, where the expensive root continued substantial work while cheaper workers also worked, producing much higher total token activity. A good Auto router should avoid that failure mode by making delegated work genuinely replace expensive parent work where possible.

    For real coding workflows, this kind of orchestration would be a bigger usability and efficiency improvement than simply introducing successively stronger default models.

  9. otikk commented on Sep 9, 2026

    @otikk

    One more practical user-perspective follow-up after using Cursor and Codex side by side.

    The biggest difference is becoming less about raw model quality and more about routing + billing ergonomics.

    In my current Cursor workflow, I can use a strong model for the difficult parts while the product appears to handle a lot of routine work through a faster/lower-cost path (for example Composer Fast). I am not claiming to know Cursor's exact internal routing implementation, but the user experience is noticeably different: I can keep working for long sessions without feeling that every repository search, mechanical edit, test run, formatting pass, or straightforward implementation step is consuming the same expensive reasoning budget.

    That is exactly the behavior I would like Codex Auto to provide natively:

    • strong model for architecture, ambiguous debugging, migrations, risky decisions, or escalation after failure;
    • faster/cheaper model for repository search, mechanical edits, formatting, test execution, summaries, and straightforward implementation;
    • automatic escalation only when complexity, uncertainty, or risk actually requires it;
    • model choice and reasoning effort routed independently;
    • optimize for total task-completion cost (tokens + retries + latency + review), not model strength per turn.

    The second part is billing UX. For heavy daily Codex use, the current experience can feel like:

    subscription -> included allowance -> hard friction -> manually buy more credits.

    A much more natural developer workflow would be:

    subscription -> included Codex usage -> automatic PAYG/on-demand usage -> user-defined monthly spending cap.

    That way a user could simply set, for example, "allow up to $25 additional usage this month" and keep working. No manual credit top-up step, while still retaining strict cost control.

    This matters because a strong model is not the problem by itself. The problem is using expensive inference for work that does not require it, then adding billing friction when the allowance is exhausted.

    From a user's perspective, Cursor currently feels more efficient for long coding sessions even when the underlying model quality is comparable, because the product gets out of the way. It would be a shame if Codex lost power users primarily because routing and usage UX make the strongest model economically awkward to use.

    So my preferred product surface is still very simple:

    Auto / Fast / Deep

    • Auto: transparently route model + effort within user-defined bounds and budget.
    • Fast: prioritize speed/cost for routine work.
    • Deep: explicitly use the strongest allowed model/effort for difficult work.

    The important metric should be successful task completion per unit of cost, not maximum model strength on every turn.

  10. mkostrus-gif commented on Sep 23, 2026

    @mkostrus-gif

    I strongly support this request. I use Codex Desktop intensively and currently choose both the model and reasoning effort manually, often several times within one task.

    The target should be a native, opt-in Auto mode that minimizes the total cost of a successfully completed task—not just per-turn price. It should start with the cheapest allowed route likely to succeed, verify the result, and escalate the model and/or effort when ambiguity, risk, failed checks, or repeated attempts justify it.

    For trust and control, please include:

    • a user-defined model pool;
    • per-model minimum and maximum reasoning effort;
    • authoritative manual override or pinning;
    • the selected model, effort, and a concise routing reason;
    • re-routing at phase boundaries (for example: plan, implement, debug, and verify), not only once per thread.

    This would reduce both over-allocation and costly retries while preserving user control.

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 appapp-serverIssues involving app server protocol or interfacesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions