Skip to content

Conversation

@breezewish
Copy link

@breezewish breezewish commented Nov 5, 2025

Close #6023

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...". This PR adds support for customizing the system-prompt for the non-interactive mode (exec).

The --system-prompt parameter usage is similar to Claude Code, just accepts prompts inline.

With this feature, people could have exactly the same effect as /review using the review system prompt in exec, or whatever system prompt he/she likes.

I manually verified it works by reviewing the LLM stream:

cargo run --bin codex --release -- exec --skip-git-repo-check --system-prompt "you are a helpful agent" -
image

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@breezewish
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Nov 5, 2025
@etraut-openai
Copy link
Collaborator

Thanks for the contribution. Which bug report is this related to? The link points back to this PR rather than an issue.

@etraut-openai etraut-openai added the needs-response Additional information is requested label Nov 5, 2025
@breezewish
Copy link
Author

@etraut-openai Oh sorry, wrong link. Fixed. It should be #6023

@etraut-openai etraut-openai removed the needs-response Additional information is requested label Nov 6, 2025
@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@breezewish breezewish changed the title Support customizing system-prompt in exec feat: support customizing system-prompt in exec Nov 9, 2025
youta7 added a commit to youta7/ta-codex that referenced this pull request Nov 10, 2025
@etraut-openai
Copy link
Collaborator

Thanks for the contribution. We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap.

This is a feature we'd like to add, but we need to give more thought to how to expose it. We don't have the bandwidth to do the necessary design work at this time, but we will get to it eventually. We are using upvotes (thumbs-up reactions) to help inform guide our prioritization of features.

@breezewish breezewish deleted the wenxuan/system-prompt branch November 11, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support customizing system prompt in exec?

2 participants