mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Key features - Custom prompts accept arguments: $1..$9, $ARGUMENTS, and $$ (literal) - @ file picker in composer: type @ to fuzzy‑search and insert quoted paths - Frontmatter hints: optional description + argument-hint shown in palette (body stripped before send) Why - Make saved prompts reusable with runtime parameters. - Improve discoverability with concise, helpful hints in the slash popup. - Preserve privacy and approvals; no auto‑execution added. Details - Protocol: extend CustomPrompt with description, argument_hint (optional). - Core: parse minimal YAML‑style frontmatter at file top; strip it from the submitted body. - TUI: expand arguments; insert @ paths; render description/argument-hint or fallback excerpt. - Docs: prompts.md updated with frontmatter and argument examples. Tests - Frontmatter parsing (description/argument-hint extracted; body stripped). - Popup rows show description + argument-hint; excerpt fallback; builtin name collision. - Argument expansion for $1..$9, $ARGUMENTS, $$; quoted args and @ path insertion. Safety / Approvals - No changes to approvals or sandboxing; prompts do not auto‑run tools. Related - Closes #2890 - Related #3265 - Complements #3403
codex-core
This crate implements the business logic for Codex. It is designed to be used by the various Codex UIs written in Rust.
Dependencies
Note that codex-core makes some assumptions about certain helper utilities being available in the environment. Currently, this
macOS
Expects /usr/bin/sandbox-exec to be present.
Linux
Expects the binary containing codex-core to run the equivalent of codex debug landlock when arg0 is codex-linux-sandbox. See the codex-arg0 crate for details.
All Platforms
Expects the binary containing codex-core to simulate the virtual apply_patch CLI when arg1 is --codex-run-as-apply-patch. See the codex-arg0 crate for details.