CLI: Add /edit command to edit a prompt in an editor
Resolved 💬 2 comments Opened Jun 30, 2026 by fabianx-ai Closed Jul 18, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
Codex just added me to a local chat interface the command /edit and it's so useful!
Can this be added to the main codex CLI?
Sometimes I have longer prompts and being able to edit it, is so useful!
Expected behavior: I am working on a prompt and I want to change it in significant ways.
I use: Ctrl+A to go to the start, prefix it with /edit and can then edit it.
Additional information
_No response_
2 Comments
This workflow is already supported in the Codex CLI. While composing a prompt, press Ctrl+G to open the current draft in your external editor. Codex uses
$VISUAL, falling back to$EDITOR; for example,VISUAL="code --wait". Save and close the editor to return the edited text to Codex.Thank you very much!