Answer: Press Ctrl+G in the composer to open the editor configured by VISUAL, or EDITOR when VISUAL isn't set. Save and close the editor to return the text to the composer before sending it. Status: Confirmed Entry: tool/codex/commands-and-shortcuts/open-prompt-editor Revision: 1 Digest: sha256:fb08c3e5797d70e4 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:47:56Z Last changed: 2026-11-13T03:47:56Z Last verified: 2026-11-20T13:35:32Z Next check: 2026-11-21T13:35:32Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Editor variable | VISUAL | [1] | 2026-11-20 Fallback editor variable | EDITOR | [1] | 2026-11-20 Sources: [1] OpenAI. "CLI customization". https://learn.chatgpt.com/docs/cli-customization.md Role: primary. Accessed: 2026-11-20T13:35:32Z Quote: "the editor configured by `VISUAL`, or `EDITOR` when `VISUAL` isn't set" (Supports: Editor variable) Quote: "`EDITOR` when `VISUAL` isn't set" (Supports: Fallback editor variable) Snapshot SHA-256: 7f59bf08264c63061b59a6a0050376c4633d22c9e96915ec1d565e85a032b382 (captured 2026-11-13T03:47:55Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:47:56Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:35:32Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:35:32Z Last attempt: 2026-11-20T13:35:32Z Notes and limitations: Extracted automatically from a single official source (section "Prompt editor"). Related: https://latestn.com/tool/codex/commands-and-shortcuts/request-codex-review-command How do I request a Codex review on a GitHub pull request? https://latestn.com/tool/codex/commands-and-shortcuts/resume-interrupted-bulk-scan How do I resume an interrupted bulk scan in Codex Security CLI? https://latestn.com/tool/codex/commands-and-shortcuts/run-first-scan How do I run my first Codex Security CLI scan on a local repository? https://latestn.com/tool/codex/commands-and-shortcuts/exec-non-interactive How do I run Codex non-interactively with codex exec? https://latestn.com/tool/codex/commands-and-shortcuts/import-from-another-agent-cli How do I import from another agent using Codex CLI? https://latestn.com/tool/codex/commands-and-shortcuts/import-from-cli How do I import scanner findings into Daybreak from the CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:47:56Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/commands-and-shortcuts/open-prompt-editor/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/commands-and-shortcuts/open-prompt-editor POST: https://latestn.com/dispute/tool/codex/commands-and-shortcuts/open-prompt-editor with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/commands-and-shortcuts/open-prompt-editor?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I open an external editor for long prompts in the Codex CLI? Revision 1, last verified 2026-11-20T13:35:32Z. https://latestn.com/tool/codex/commands-and-shortcuts/open-prompt-editor (accessed 2026-11-21T10:06:50Z). @misc{LatestN_tool_codex_commands_and_shortcuts_open_prompt_editor_r1, title = {How do I open an external editor for long prompts in the Codex CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/commands-and-shortcuts/open-prompt-editor}}, note = {Revision 1; digest sha256:fb08c3e5797d70e4; last verified 2026-11-20T13:35:32Z; accessed 2026-11-21T10:06:50Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/commands-and-shortcuts/open-prompt-editor