Feature request: support custom slash commands in interactive CLI
Resolved 💬 1 comment Opened Feb 6, 2026 by zane0307-pixel Closed Feb 6, 2026
Summary
Please add support for user-defined slash commands in Codex interactive mode (the / command palette).
Problem
Today, slash commands appear to be built-in only.
Users who run repetitive workflows cannot register project-specific commands (e.g. /fix-tests, /review-pr, /release-notes) and must repeatedly type long prompts/options.
Proposed solution
Add a configurable custom slash command system.
Suggested UX
- Define commands in config (global and project-level), e.g.
~/.codex/config.tomland optional repo-local file. - Commands appear in
/autocomplete menu with descriptions. - Support parameter placeholders (e.g.
$1,${branch}). - Command body can:
- inject prompt text
- optionally attach fixed flags/profile
- optionally run a predefined local script (with existing approval/sandbox model)
Example (illustrative)
[slash_commands.fix_tests]
description = "Analyze and fix failing tests"
prompt = "Run tests, identify root causes, apply minimal fixes, and rerun."
[slash_commands.review_pr]
description = "Review current branch diff"
prompt = "Perform a code review focused on regressions, security, and missing tests."
Why this matters
- Faster repeated workflows
- Better team standardization
- Lower prompt friction
- Closer parity with tools that already support custom slash commands
Backward compatibility
No breaking changes expected. If no custom commands are configured, behavior remains unchanged.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗