Feature request: dynamic model aliases/macros in Codex CLI sessions
Open 💬 1 comment Opened Aug 11, 2026 by alex31
Feature request
Add configurable aliases or macros in Codex CLI that change the model and reasoning effort dynamically within an already-running session, without opening the nested /model picker.
For example, define aliases in config.toml and invoke them as /model fast or /model deep, with optional keybindings.
Profiles and shell aliases only apply at process startup, so they do not support this workflow.
Codex feedback thread ID: 019fefcd-efb7-7520-ae8f-b1173aeef6c3
1 Comment
Implementation shape from the current code: everything below the surface already supports this. Mid-session model + effort changes ride
ThreadSettingsOverrides(model,reasoning_effortfields —protocol/src/protocol.rs), which is what the/modelpicker submits; the picker is just the only UI issuing it. And the TUI keymap is user-configurable per action ([tui.keymap]), so alias keybindings have an existing pattern to hang off.So the feature reduces to: (1) parse an argument on the existing
/modelslash command (tui/src/slash_command.rs— today it only opens the picker) and resolve it against a[model_aliases]config table mapping alias →{model, effort}; (2) optionally a keymap action per alias. No new protocol, no session restart — the same override the picker sends, minus the nested UI. Also worth accepting raw slugs (/model gpt-5.6-sol high) since the resolution machinery would be identical with aliases as sugar.