Slash commands for `codex exec`

Resolved 💬 5 comments Opened Sep 23, 2025 by vjain419 Closed Jan 30, 2026
💡 Likely answer: A maintainer (dedrisian-oai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

currently codex doesn't allow exec slash commands using codex exec (headless codex). from my pov - idea of slash cmd (which I proposed initially and also had PR) so that repetitive workflow / prompts can be abstracted without copy paste - this also apply for headless codex - e.g I want to run codex exec /review in gitlab/github/gerrit ci but currently I can't due to this limitation.

Are you interested in implementing this feature?

I can if needs to be but I think OAI team is well staff :P - let me know if you want to me to push PR.

Additional information

_No response_

View original on GitHub ↗

5 Comments

dedrisian-oai contributor · 11 months ago

Sounds interesting! Will discuss.

phillbee · 9 months ago

Also just filed a feedback item on this: thread id 019a52be-9d3f-7242-ac26-881a9afce7b6

Would be useful for non-github CI/CD pipelines (e.g., gitlab, which we currently use)

kvz · 9 months ago

Think this would be perfect to add to my local prompting, too:

Implement such and so
When done, run `yarn lint:ts && yarn test:unit && codex --review pr-style` and take care of any problem that you think is real.

Could even be a part of my AGENTS.md. The Codex reviews are outstanding. First time an LLM _really_ provides meaningful debugging to me. 8/10 times it uncovers a deep problem I hadn't considered.

If I can tie it into my flow like this it's gonna be that much more powerful

jbrown9513 · 9 months ago

We are exploring adding hundreds of custom slash commands, and also want to be able to chain these together into configurable workflows.

A very lofty workflow:
codex exec /checkout_branch
codex exec /implement_feature ISSUE=123
codex exec /add_test
codex exec /create_p

etraut-openai contributor · 6 months ago

Closing as duplicate of #3641, which has more upvotes