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!

Where did you find it?

https://github.com/openai/codex

View original on GitHub ↗

4 Comments

adsqx · 1 year ago

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.

WarrenZhu050413 · 1 year ago

Sorry, I didn't make it clear. I meant in headless mode, when we use codex exec. This is not well documented.

wbdb · 1 year ago

Here are a few examples of how you can access profiles or call them up directly:

profile = "team" #default
model = "gpt-5"
model_reasoning_effort = "high"

[profiles.team]
preferred_auth_method = "chatgpt"

[profiles.api]
preferred_auth_method = "apikey"

codex --profile api

or direct:

codex -m gpt-5 --config model_reasoning_effort="high"

tibo-openai collaborator · 11 months ago

Answered above, considering this resolved! Note that you can also type /model to change between different gpt-5 reasoning levels mid-conversation.