Answer: Codex reads prompt metadata and resolves placeholders the next time the session starts. You add metadata via YAML front matter (e.g., `description:` and `argument-hint: KEY=`) and arguments via positional placeholders `$1` through `$9`, `$ARGUMENTS`, or named placeholders like `$FILE` supplied as `KEY=value`. Status: Confirmed Entry: tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments Revision: 1 Digest: sha256:9db2a1a17e81b7dc (changes whenever the content changes) Timeline: Created: 2026-11-13T03:48:28Z Last changed: 2026-11-13T03:48:28Z Last verified: 2026-11-20T13:36:09Z Next check: 2026-11-21T13:36:09Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Description metadata | description: | [1] | 2026-11-20 Argument hint | argument-hint: KEY= | [1] | 2026-11-20 Positional placeholders | $1 | [1] | 2026-11-20 All arguments placeholder | $ARGUMENTS | [1] | 2026-11-20 Named placeholders | $FILE | [1] | 2026-11-20 Quoting values with spaces | FOCUS="loading state" | [1] | 2026-11-20 Literal dollar signs | $$ | [1] | 2026-11-20 Sources: [1] OpenAI. "Custom Prompts". https://learn.chatgpt.com/docs/custom-prompts.md Role: primary. Accessed: 2026-11-20T13:36:09Z Quote: "Set it in YAML front matter as `description:`." (Supports: Description metadata) Quote: "Document expected parameters with `argument-hint: KEY=`." (Supports: Argument hint) Quote: "`$1` through `$9` expand from space-separated arguments you provide after the command." (Supports: Positional placeholders) Quote: "`$ARGUMENTS` includes them all." (Supports: All arguments placeholder) Quote: "Use uppercase names like `$FILE` or `$TICKET_ID` and supply values as `KEY=value`." (Supports: Named placeholders) Quote: "Quote values with spaces (for example, `FOCUS="loading state"`)." (Supports: Quoting values with spaces) Quote: "Write `$$` to emit a single `$` in the expanded prompt." (Supports: Literal dollar signs) Snapshot SHA-256: d6f7cf8dd9f31d2faf5604ef3a6f8322132a7b66fa50823109cb681e372a0fa9 (captured 2026-11-13T03:48:27Z) 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:28Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:36:09Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:36:09Z Last attempt: 2026-11-20T13:36:09Z Notes and limitations: Extracted automatically from a single official source (section "Add metadata and arguments"). Related: 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/codex/commands-and-shortcuts/codex-ide-extension-commands What commands and default key bindings does the Codex IDE extension provide? https://latestn.com/tool/codex/commands-and-shortcuts/configure-deep-scan How do I configure a deep scan with the Codex Security CLI? https://latestn.com/tool/codex/commands-and-shortcuts/create-custom-prompt How do I create a custom prompt in Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:48:28Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments/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/custom-prompt-metadata-arguments POST: https://latestn.com/dispute/tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add metadata and arguments to a Codex custom prompt? Revision 1, last verified 2026-11-20T13:36:09Z. https://latestn.com/tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments (accessed 2026-11-21T10:07:59Z). @misc{LatestN_tool_codex_commands_and_shortcuts_custom_prompt_metadata_arguments_r1, title = {How do I add metadata and arguments to a Codex custom prompt?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/commands-and-shortcuts/custom-prompt-metadata-arguments}}, note = {Revision 1; digest sha256:9db2a1a17e81b7dc; last verified 2026-11-20T13:36:09Z; accessed 2026-11-21T10:07:59Z} } 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/custom-prompt-metadata-arguments