Cmd. /mention
Attach a file or path to the conversation.
Key takeaways
/mention <path>highlights a file or folder so the next turns can reference that context directly.- Mention the file with the failing behavior, or a design doc or config, before asking for a fix.
- Unlike
/init, which persists repo instructions across sessions,/mentionis one-off context for the next turn. - Mention only what matters; too much context can distract the model, and avoid files with secrets unless the task and policy allow it.
Original Command Declaration
/mention <path>Official Summary
/mention highlights a file or folder for Codex so the next turns can reference that context
directly.
Usage
/mention <path>Good Examples
- Mention the file that contains the failing behavior before asking for a fix.
- Mention a design doc or config file when the next request depends on it.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/mention | Attaches one-off file context | The next turn needs a specific path |
/init | Creates persistent repo instructions | The context should live across sessions |
/status | Shows current workspace state | You need to confirm roots and policy |
Use Cases
- Pointing Codex at source files, logs, docs, or configs.
- Reducing unnecessary codebase search.
- Making prompt context explicit for reviewers.
Cautions
- Mention only the files that matter; too much context can distract the model.
- Do not mention files containing secrets unless the task truly requires it and the policy allows it.
Release Basis
- Judgment: first observed mention
- First evidence version:
rust-v0.105.0 - Date (UTC): 2026-02-25
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.105.0
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features