Feature Request: Add SlashCommand tool-style auto invocation to Codex CLI
Resolved 💬 1 comment Opened Sep 26, 2025 by alexx-ftw Closed Jan 14, 2026
What feature would you like to see?
What changed
- Request Codex CLI to expose SlashCommand style metadata so the assistant can auto run custom
/commandswhen instructions mention them, matching Claude's SlashCommand tool behavior. (https://docs.claude.com/en/docs/claude-code/slash-commands)
Why
- Custom prompts only run when the human triggers them; the CLI still treats assistant initiated
/commandtext as plain chat, including incodex exec, which blocks scripted workflows. (https://github.com/openai/codex/issues/3641) - Users have already filed related feature requests for richer slash command support, so end to end parity would unlock those efforts. (https://github.com/openai/codex/issues/913)
How to try locally
- Place a command such as
write-unit-test.mdinto~/.codex/prompts/, restart Codex, and confirm it appears in the/menu. (https://tech-bridge-log.com/blog/codex-cli-latest-gpt5) - In a session, tell Codex "please run /write-unit-test before touching tests" and observe that it echoes the text instead of invoking the command. (https://github.com/openai/codex/issues/3641)
- Compare against Claude Code, which auto invokes custom commands through the SlashCommand tool when instructions mention
/name. (https://docs.claude.com/en/docs/claude-code/slash-commands)
Flags removed or added
- None.
Safety limits
- SlashCommand auto invocations should still honor per command permissions, including
disable-model-invocationandallowed-tools, so shell access stays gated. (https://docs.claude.com/en/docs/claude-code/slash-commands)
Fallback behavior
- If the SlashCommand budget is exceeded or permissions deny it, Codex CLI should fall back to today's manual
/commandhandling. (https://docs.claude.com/en/docs/claude-code/slash-commands)
Related issues
- #913 Add ability to add custom commands / tasks. (https://github.com/openai/codex/issues/913)
- #2885 Add argument substitution for slash commands. (https://github.com/openai/codex/issues/2885)
- #3641 Support Slash Commands in
codex execmode. (https://github.com/openai/codex/issues/3641)
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗