Cmd. /ide
Include open files, selections, and IDE context in the next prompt.
Key takeaways
/idepulls IDE context such as open files and the current selection into the next Codex prompt.- Use it to refactor a selected function or reuse open-file context without restating every path.
- Unlike
/mention, which adds paths manually,/ideis best when the live editor selection is what matters. - IDE context does not replace complete project context, so check open sensitive files before attaching editor state.
Original Command Declaration
/ideOfficial Summary
/ide brings IDE context such as open files and the current selection into the next Codex prompt.
Usage
/ideGood Examples
- Ask Codex to refactor the function currently selected in your IDE.
- Reuse open-file context without restating every relevant path.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/ide | Adds editor context | The current IDE selection matters |
/mention | Adds paths manually | You are working from the CLI and know the exact path |
/status | Shows session state | You need model, permission, or root details |
Use Cases
- Pulling a selected component or test into the next request.
- Pairing IDE context with a targeted CLI prompt.
Cautions
- IDE context does not replace complete project context.
- Check open sensitive files before attaching editor state.
Release Basis
- Judgment: official docs listing
- First evidence version: official slash commands documentation
- Date (UTC): verified 2026-05-21
- Release link: https://developers.openai.com/codex/cli/slash-commands
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex IDE extension: https://developers.openai.com/codex/ide