You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shell tool execution breaks when snapshot prelude is shell-incompatible (zsh snapshot sourced under bash), causing preamble-without-execution behavior #10883
Codex Desktop/CLI can fail to execute shell tool commands when runtime prepends source ~/.codex/shell_snapshots/<id>.sh and that snapshot contains syntax incompatible with the actual runtime shell (bash -lc). The command itself never runs because snapshot sourcing fails first.
Environment
Codex: 0.98.0 (CLI + Desktop bundle)
OS: macOS Sequoia (arm64)
User shell: zsh 5.9
Runtime wrapper observed: bash -lc
Observed behavior
Assistant says it will run a shell command (preamble visible).
No expected command output appears.
Underlying failure occurs before command execution due to snapshot parse errors.
~/.codex/shell_snapshots/<snapshot-id>.sh: line 620: syntax error near unexpected token `('
... local -a packages_full_path=(${global_node_modules}/*(N))
... builtin: autoload: not a shell builtin
... syntax error near unexpected token `}'
This is zsh syntax being sourced in bash.
After deleting ~/.codex/shell_snapshots, shell tool worked immediately:
echo TOOL_OK && date → success, exit 0
same rg command → success, exit 0
Expected behavior
Tool calls should not be blocked by incompatible snapshot prelude.
If snapshot sourcing fails, Codex should either:
skip snapshot and run command in clean mode, or
fail loudly with explicit tool-call error surfaced in UI/logs.
Activity
archiboi69 commentedon Feb 6, 2026
Found root cause: Codex Desktop enables shell snapshot via Statsig feature overrides (runtime/session flags), which override [config.toml].
Evidence: Desktop log shows at startup:
Features enabled: enable_request_compression, collaboration_modes, personality, request_rule, shell_snapshot.
App Local Storage LevelDB contains Statsig feature_overrides with shell_snapshot: true.
Core only snapshots when Feature::ShellSnapshot is enabled ([codex.rs (line 1015)] feature key in [features.rs]
Config layering precedence shows session flags above user config ([README.md].
jif-oai commentedon Feb 6, 2026
Will fix thanks
archiboi69 commentedon Feb 6, 2026
slay