Feature request: configurable prompt snippets in the TUI composer
What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
I would like to add configurable prompt snippets to the Codex CLI TUI composer.
The intended workflow is:
- The user types a normal task prompt.
- When the cursor is after a trigger such as
--, Codex shows a small picker with user-defined phrases/snippets. - The user selects one item with keyboard navigation.
- Codex inserts the selected phrase at the cursor position immediately.
## Motivation
Some users repeatedly add the same task constraints, verification requirements, coding preferences, or workflow
instructions to prompts. A lightweight snippet picker would reduce repetitive typing while keeping the final prompt
visible and editable before submission.
Examples of snippets:
- "追根溯源,从根源处修复,避免臃肿实现。"
- "改动后运行相关测试,并说明验证结果。"
- "保持改动最小,不要重构无关代码。"
## Proposed behavior
- Snippets are user-configurable.
- The trigger could be configurable, with a default such as
--orspace + --. - The picker should work inside the existing TUI prompt composer.
- Selecting a snippet inserts plain text into the current prompt.
- It should not send the prompt automatically.
- It should not affect slash commands such as
/model,/review,/skills, etc.
## Possible configuration shape
For example:
```toml
[prompt_snippets]
trigger = "--"
[[prompt_snippets.items]]
label = "Root-cause fix"
text = "Trace the issue to its root cause and keep the fix minimal."
[[prompt_snippets.items]]
label = "Run tests"
text = "Run the relevant tests and report the verification result."
## Question for maintainers
Would this be an acceptable feature direction for Codex CLI?
If yes, I would like to implement it and submit a PR, following the contribution process.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗