Answer: You reference open files, selected code, and recent chats directly from the composer, so Codex starts with the code you are already looking at. Status: Confirmed Entry: tool/codex/memory-and-context/add-editor-context-to-prompt Revision: 1 Digest: sha256:560c502d50a3de68 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:48:12Z Last changed: 2026-11-13T03:48:12Z Last verified: 2026-11-20T13:35:51Z Next check: 2026-11-21T13:35:51Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of method | Reference open files, selected code, and recent chats directly from the composer | [1] | 2026-11-20 starting context | Codex starts with the code you are already looking at | [1] | 2026-11-20 Sources: [1] OpenAI. "Codex IDE extension". https://learn.chatgpt.com/docs/codex/ide.md Role: primary. Accessed: 2026-11-20T13:35:51Z Quote: "Reference open files, selected code, and recent chats directly from the composer." (Supports: method) Quote: "Codex starts with the code you are already looking at" (Supports: starting context) Snapshot SHA-256: bbecaad17ae60f9e3ca79ef1e1323da89b71d9f46150aeba25fb0fb84ca5fa63 (captured 2026-11-13T03:48:11Z) 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:48:12Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:35:51Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:35:51Z Last attempt: 2026-11-20T13:35:51Z Notes and limitations: Extracted automatically from a single official source (section "Why use Codex IDE extension"). Related: https://latestn.com/tool/codex/memory-and-context/agents-md-discovery-precedence How does Codex discover and load AGENTS.md files for a project? https://latestn.com/tool/codex/memory-and-context/composer-predictions-context What context do Codex composer predictions use to suggest my next message? https://latestn.com/tool/codex/memory-and-context/control-memories-per-chat How do I control whether a specific chat can use or contribute to Codex local memories? https://latestn.com/tool/codex/integrations/vertex-ai-prerequisites What do I need to set up before connecting Codex to Google Cloud Vertex AI? https://latestn.com/tool/codex/integrations/view-pull-request How do I view a pull request in Codex Code Review? https://latestn.com/tool/codex/integrations/webmcp-vs-mcp What is the difference between WebMCP and MCP for ChatGPT and Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:48:12Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/memory-and-context/add-editor-context-to-prompt/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/memory-and-context/add-editor-context-to-prompt POST: https://latestn.com/dispute/tool/codex/memory-and-context/add-editor-context-to-prompt with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/memory-and-context/add-editor-context-to-prompt?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I bring open files and selected code into a Codex IDE prompt? Revision 1, last verified 2026-11-20T13:35:51Z. https://latestn.com/tool/codex/memory-and-context/add-editor-context-to-prompt (accessed 2026-11-21T10:01:50Z). @misc{LatestN_tool_codex_memory_and_context_add_editor_context_to_prompt_r1, title = {How do I bring open files and selected code into a Codex IDE prompt?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/memory-and-context/add-editor-context-to-prompt}}, note = {Revision 1; digest sha256:560c502d50a3de68; last verified 2026-11-20T13:35:51Z; accessed 2026-11-21T10:01: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/memory-and-context/add-editor-context-to-prompt