openai / openai/codex

Feature request: let plugin commands set model and reasoning effort before a turn

Open
#45,904 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CLI enhancement skills
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

Codex CLI with marketplace plugin commands. The same host capability would be useful wherever plugin commands are exposed.

What feature would you like to see?

Allow a user-invoked plugin command to change the active model and reasoning effort through a supported Codex host action, before optionally submitting a task. The plugin should be able to set the pair together, with the same effective scope and persistence as a manual model selection.

Our use case is a Baton Boost plugin with easy and hard presets. Each command chooses a configured model + reasoning-effort pair. Illustrative user-facing syntax:

/easy                 -> select the easy preset for subsequent turns
/hard fix the race     -> select the hard preset, then submit "fix the race" as one new turn

The exact model IDs and effort levels are user/plugin configuration, not proposed Codex defaults. A preset can be changed again by another preset or the native model selector.

Today Codex imports plugin commands/ as skills (source), while /model is a host-owned action (source). A command-as-skill can describe a preset, but it has no supported deterministic way to apply model + effort to the active thread before the next turn. Editing config.toml, simulating TUI input, or asking the model to switch itself would not provide the required ordering or effective-state confirmation.

Could Codex expose a narrow, host-mediated capability to plugin commands, either as a command action or a command result? Conceptually:

set_model_config({ model, reasoning_effort })

The host would resolve and validate the pair against the current model catalog, apply it through the same route as native selection, and return the effective model + effort (or a clear error). The plugin owns only the easy/hard policy; Codex owns validation, thread state, persistence, and UI synchronization.

Expected behavior

  1. Invoking the easy or hard plugin command without task text changes the selection for subsequent turns, visibly in the native selector/status.
  2. Invoking it with task text applies the pair successfully before admitting exactly one user message and one turn. The task text and attachments are preserved.
  3. Unsupported model/effort combinations fail before task submission; the draft remains available and Codex does not silently use the previous pair.
  4. A later manual selection takes effect normally; the plugin does not retain a hidden override.
  5. The effective route reported by the host matches the model + effort used for the turn.
Additional information

Baton's command contract has a configureModel({ model?, effort? }) verb and uses it for preset commands (public design). This request is for the corresponding Codex plugin command capability, not for built-in easy/hard presets or automatic task classification. #34278 is related to automatic model/effort routing, but asks for a different trigger and policy owner.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading codex-rs/core-plugins/src/command_migration/plugin.rs and the host-owned /model path in codex-rs/tui/src/chatwidget/slash_dispatch.rs. Trace how plugin commands and native model selection are dispatched, then define the host-mediated flow. Done means validated model and reasoning-effort pairs update visible state, preserve drafts, and apply before exactly one submitted turn.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.