
Codex CLI Presets: Save Prompts, Snapshot Settings
Codex CLI 0.164.0 alpha adds ten TUI prompt presets, opened with /presets or the default leader shortcut Ctrl+X, then p. Learn how to create, edit, and use presets—including session-setting snapshots—and how byte limits and shell-prefix validation affect what you can save.
The episode also notes that the alpha release pages contain no detailed notes, so the changes discussed are based on the commit list.
Chapter 1
x
Ethan Park
Hey, everybody. Before anything else, thanks to Jellypod for helping make this daily show a reality. Today we're looking at the 0.164.0 alpha series. Stable 0.163.0 landed on October 15, and alpha 1 through alpha 3 followed on October 16 to 17. The release pages for the alphas are just bare tags, so everything we cover comes from the commit list, roughly pull requests 54378 through 54388. That matters for the caveats later.
Maya
Last episode we covered the leader key in /keymap, Ctrl+X by default. This is the first real thing built on top of it. It's a presets system for the TUI, plus inline flags that let you change settings for one session without touching config.toml.
Ethan Park
Start with presets. There's a new /presets command with ten numbered slots, zero through nine. Each slot holds a saved piece of composer input, and you can open the picker with the command or with a shortcut. The shortcut is leader p. With the default leader, that's Ctrl+X, then p. The binding name is tui.keymap.chat.open_presets, so you can presumably rebind it. A responsive menu pops up right above the composer.
Maya
And inside that menu it's all single keys. Press a digit, zero to nine, and it runs the preset in that slot. If the slot is empty, the same key starts creating one. Press n to create a preset from whatever text is currently in your composer. Press s to snapshot your current session settings, meaning model, reasoning effort, speed tier, and permission profile, into a preset. Press e to edit, and d to delete, which asks for confirmation first.
Ethan Park
One detail I like: if you've half typed a prompt and you fire a preset, your draft is preserved. The preset goes through normal queued submission, so it doesn't stomp what you were writing. Storage is in config, under tui.presets and then the slot number. Each entry takes an input string and an optional label string. So a slot could be a standing instruction like run the tests and summarize failures, labeled tests.
Maya
There are validation rules, and they're the part to read before you build a library of these. Blank input is rejected. Input over 8,000 UTF 8 bytes is rejected. And any input that starts with an exclamation mark, after leading whitespace, is rejected, because that's the shell command prefix. So a preset can't be a way to run a shell command without you typing it.
Ethan Park
That's a sensible line. A saved slot that quietly runs shell on a keypress would be a bad surprise in a shared dotfiles repo.