Codex
In the Codex panel in VS Code and in the codex command in your terminal, OptiFlume picks the model for each prompt and says why.
Where it works
- The Codex panel in VS Code, and in Cursor and Windsurf, which use the same extension.
codexin any terminal.
It is on as soon as OptiFlume is installed. You keep using Codex exactly as before, with your own ChatGPT account and plan: OptiFlume changes which model and reasoning effort each prompt runs on, nothing else.
What you see
For each prompt, OptiFlume picks the model and effort it needs and tells you in one line, for example:
OptiFlume: routine change → GPT-5.6 Terra · low- In the panel: the model picker shows the model that ran. The one-line reason is in the hook entry under your prompt.
- In the terminal: the line appears under your prompt as a hook message.
A switch applies to that prompt only and never changes your saved default model. Picking a model yourself is fine too: the next prompt is still checked.
Keep your own model for a prompt
Start the prompt with ~, with or without a space:
~ refactor this module carefully
~explain this errorThat prompt stays on the model you have selected, and the ~ is removed before Codex sends it. If your prompt itself starts with a path such as ~/project, add the marker in front: ~ ~/project/app.py is failing. In the panel, a leading ! works too.
Setup, the first time
- Approve OptiFlume’s hook once in Codex → Settings → Hooks. The hook only shows the one-line reason; switching works without it.
- VS Code open during the install? Click Restart VS Code on the note that appears (it reloads the window). The Codex panel starts using OptiFlume after that.
- Terminal: open a new terminal window or tab. One that was already open still runs the plain
codex. - Sign in from the OptiFlume note in VS Code, or run
optiflume loginin a terminal.
Turn it off, or back on
optiflume harness off # the panel (Claude Code and Codex)
optiflume terminal off # claude and codex in the terminal
optiflume harness on
optiflume terminal onTurning it off puts your editor settings and the Codex hook back exactly as they were. The installer’s Customize step has the same two choices. To keep your own model for a single prompt instead, start it with ~.
What OptiFlume changes, and what it leaves alone
- one setting in VS Code (and in Cursor and Windsurf) so the Codex panel uses OptiFlume;
- one hook, for the one-line reason, in a marked block of
~/.codex/config.toml; - OptiFlume’s own
codexcommand in~/.optiflume/bin, first on your PATH, socodexin a new terminal runs with OptiFlume (optiflume terminal offturns this off; details); - the OptiFlume Status extension, for the status bar.
Your AGENTS.md files, transcripts and sign-in stay as they are. Codex updates keep working as before. OptiFlume only uses models your ChatGPT account can run. Uninstalling removes everything above and restores your settings.
Safety and long sessions
The Guardian, working memory and the session watchdog, and the optional Stop/Keep notice work in Codex as in every tool.
Privacy
OptiFlume decides on your Mac and never sends your prompts or code anywhere. Codex still sends your prompt to the model, as it always has. See What is stored where.
If a prompt does not switch
- Run
optiflume doctor: it checks the panel in each editor, the terminal command and the Codex hook. - On the free tier OptiFlume shows its pick and you switch yourself; Pro and the trial switch for you.
- More in Troubleshooting.