`exec` subcommand doesn't detect `--model` argument specified before it.

Resolved 💬 1 comment Opened Aug 14, 2025 by zzJinux Closed Aug 14, 2025

What version of Codex is running?

codex-cli 0.21.0

Which model were you using?

gpt-4.1

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

$ codex -m gpt-4.1 exec --skip-git-repo-check "hello"

[2025-08-14T16:01:35] OpenAI Codex v0.21.0 (research preview)
--------
workdir: ...
model: gpt-5
provider: openai
approval: never
sandbox: read-only
reasoning effort: medium
reasoning summaries: auto
--------

What is the expected behavior?

model: gpt-4.1 is shown.

What do you see instead?

model: gpt-5

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗