Support customizing system prompt in exec?

Resolved 💬 2 comments Opened Oct 31, 2025 by breezewish Closed Jan 31, 2026

What feature would you like to see?

For now system prompt can be switched via /prompt in interactive mode. But in non-interactive mode there is no way to do this. All conversations are sent with the default system prompt "You are Codex, based on GPT-5...".

I think codex could introduce --system-prompt <prompt> especially for codex exec just like Claude Code to allow customizing the system prompt.

Additional information

This could be extremely useful when use codex in CI or automated cases. For example, /review contains a system prompt "You are acting as a reviewer for a proposed code change made by another engineer...." but there is no way to replicate this as the system prompt when we really want to review automatically in CI, because there is neither --review to just enable this review system prompt, nor --system-prompt to switch the default prompt manually.

BTW here is a verified implementation for this feature: https://github.com/openai/codex/compare/main...breezewish:codex:wenxuan/system-prompt?expand=1

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗