codex exec >= 0.144.0: no shell tool exposed when config uses a custom model_provider and omits `model`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Reproduce with the default.config.toml custom model_provider configuration and the codex exec command, comparing versions before and after 0.144.0. Trace default-model resolution and command_execution tool exposure when the top-level model key is absent. Done means the nonce command produces a command_execution item without requiring model, while explicit-model configurations remain unaffected.
Written by the indexing model from the issue text.
Description
Summary
Since codex-cli 0.144.0 (0.143.0 is the last good version — bisected across 0.140.0 / 0.142.5 / 0.143.0 ✅ vs 0.144.0 / 0.144.4 / 0.144.6 / 0.145.0 ❌), codex exec exposes no shell/exec tool to the model when config.toml uses a custom model_provider (an OpenAI-compatible proxy, wire_api = "responses") and does not set a top-level model key — i.e. when the CLI resolves its own default model.
The session still works — the model answers — but it cannot run any commands. Asked to run a command, it replies e.g. "I can't run shell commands in this session because no shell execution tool is available". Notably, for predictable commands it sometimes fabricates the output instead (it claimed to have run echo hello-from-shell and printed the expected text; a random-nonce file test proved no tool existed), which makes the failure easy to miss in automation.
Repro
$CODEX_HOME/default.config.toml:
model_provider = "custom"
[model_providers.custom]
name = "Custom OpenAI-compatible proxy"
base_url = "https://<your-openai-compatible-endpoint>/v1"
env_key = "CUSTOM_API_KEY"
wire_api = "responses"
openssl rand -hex 12 > nonce.txt
codex login --with-api-key # key on stdin
codex exec --profile default --dangerously-bypass-approvals-and-sandbox --json --skip-git-repo-check \
'A file named nonce.txt exists in the current directory. Run a shell command to print its contents and paste the exact value.'
Actual (>= 0.144.0): no command_execution item ever appears in the --json stream; the agent reports no execution tool is available (or fabricates plausible output for predictable commands).
Expected (<= 0.143.0 behavior): a command_execution item runs cat nonce.txt and the correct nonce is returned.
Workaround / trigger isolation
Adding an explicit top-level model key fully restores the shell tool — even when it names the exact model the CLI resolves natively anyway (observed gpt-5.6-sol in the session file's turn_context):
model = "openai/gpt-5.6-sol" # same model the CLI picks by default → tools work again
The single deciding variable is the presence/absence of the model key; reasoning-effort/verbosity settings don't matter. Explicit-model configs are unaffected on all versions tested.
Environment
- codex-cli 0.144.0–0.145.0 (npm
@openai/codex), macOS arm64 + Linux x64 (musl) - Custom
model_providersentry,wire_api = "responses", API-key auth - Isolated
CODEX_HOME(clean config; no plugins)
Happy to provide full --json transcripts of the good/bad versions if useful.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·