Repository navigation
Open
Labels
Description
What feature would you like to see?
Slash commands do not work in exec mode (or do not work in the way users expect).
For example, say I have a custom COMMIT slash command. In Claude Code, I'm able to run the equivalent of this easily: codex e "/COMMIT" - and it will run my slash command. Codex CLI does not seem to parse that as a slash command (and inject my prompt), but rather just interpret the raw text.
Proposal
Enable alias-slash commands (or a subset thereof) within the codex exec / codex e mode. That is, allow the user to prefix the prompt or combine slash commands with the prompt so that non-interactive runs can:
- Adjust or set the approval mode (e.g.
--auto-edit,--full-auto), OR via slash command semantics - Inspect status (e.g.
/status) - Possibly change model or reasoning level (via
/model) - Apply other interactive commands that should logically function even without full TUI
Examples
codex exec "/mode full-auto; fix the CI failure" (builtin)
codex exec "/approvals suggest; lint and format code" (builtin)
codex e "/status; run all tests" (builtin)
codex e "/COMMIT" (custom)Motivation
- Make
codex execmode more powerful and flexible without needing to drop into interactive mode. - Enable scripting or automation workflows that depend on triggering different contexts (mode, permissions, model) in a single command.
- Reduce friction for users who know what they want and don't need interactive prompts.
Are you interested in implementing this feature?
No response
Additional information
No response
Reacted by n0decaf, cartecparts, Asmir, Jonas Maison, Benjamin Cane, Tianshu Wang, Stefan Streichsbier, Stefan Kruger, masta-g3, Qing Li and 20 more
Reacted by andrewsforge and Gilad Cohen
Activity
[-]Feature Request: Support Slash Commands in `codex exec` Mode[/-][+]Support Slash Commands in `codex exec` Mode[/+]codex exec#4108 as a duplicate of this issuefix(codex): mark slash commands as unsupported in exec/resume mode
feat(exec): support slash command at start of prompt
HomyeeKing commentedon Apr 11, 2026
Hi @ae-openai and team,
I'd like to share a concrete use case for this feature that would significantly improve automation workflows.
Use Case: Programmatic Triggering
Currently, when using
codex execin scripts or CI/CD pipelines, we have to choose between:--full-auto --model gpt-4)Example: Git Hook Integration
Example: CI/CD Pipeline
Example: IDE Integration
IDEs could generate commands like:
Benefits
Would love to hear thoughts on prioritizing this for the exec mode. Happy to help with implementation details or testing.
feat(codex): runtime-aware sweep child-prompt encoding + Codex orches…
fix(codex): mark slash commands as unsupported in exec/resume mode