How to set custom reasoning effort
Resolved 💬 4 comments Opened Aug 26, 2025 by WarrenZhu050413 Closed Sep 3, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator)
responded on this thread — see the highlighted reply below.
What is the type of issue?
_No response_
What is the issue?
I want to use codex in headless mode, but couldn't find documentation on how to make the default model gpt-5-high (I am using codex for more complex debugging tasks).
The solution I found is to write the following into ~/.codex/config.toml:
model = "gpt-5"
model_reasoning_effort = "high"
Taken from this github issue's config using o4: https://github.com/openai/codex/issues/1482?utm_source=chatgpt.com.
It would be great if this is documented.
Thank you!
4 Comments
But when you’re in the CLI, inside /model, and you’re selecting… if you have the latest version of the CLI.
If you want it as default, it’s exactly as you wrote above. If you want to change it on the fly, use /model.
Sorry, I didn't make it clear. I meant in headless mode, when we use codex exec. This is not well documented.
Here are a few examples of how you can access profiles or call them up directly:
codex --profile apior direct:
codex -m gpt-5 --config model_reasoning_effort="high"Answered above, considering this resolved! Note that you can also type /model to change between different gpt-5 reasoning levels mid-conversation.