Repository navigation
[Bug]: Codex's command activity displays shell-wrapper quoting instead of the executed command #11362
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 12, 2026 Triage
Confirmed as a display-only Codex bug. The command runs correctly; the activity row shows the login-shell launcher’s escaped quoting instead of the command Codex executed. Copying that text fails in zsh (especially around
!). Claude is unaffected because it already sends the raw command.What’s going on
Codex
commandExecutionitems carry two strings:item.command— the wrapper, e.g./bin/zsh -lc '…'item.commandActions[].command— the inner command that actually ran
T3 currently:
- Drops
commandActionswhen slimming the activity payload (ActivityPayloadProjection.projectCommandData), so clients only see the wrapper. - Unwraps
zsh|bash|sh -c/-lcby stripping one matching outer quote pair (session-logic.unwrapKnownShellCommandWrapper, duplicated on mobile). POSIX quote-concatenation ('"'"','"'!node_modules'"') is left in the copyable text.
That matches the screenshot:
'!node_modules'becomes'"'!node_modules'"'.Related
- [Bug]: Ran command shows [powershell path] before that actual command. #1671 / fix(web): unwrap windows shell command wrappers #1719 added wrapper unwrap (Windows
pwsh -Command). This is the leftover quoting hole, not a duplicate. - fix(clients): stop repeating expanded commands #9120 / fix: better shell syntax handling for labels #9371 / fix(web): simplify expanded tool details #9549 touched command-row presentation/labels only.
No open PR. Same derivation on web/desktop; mobile has the same unwrap.
Suggested fix
Prefer
commandActions[].commandfor the displayed command (project just that short string). Keep wrapper unwrap as fallback, and unescape POSIX quote-concatenation after stripping-c/-lc. Add a regression forrg --files -g 'AGENTS.md' -g '!node_modules'.Severity: cosmetic / low. Leaving this accepted.
- addedacceptedfeature request acceptedfeature request acceptedvia-triageFiled through npx t3 triageFiled through npx t3 triageand removedneeds-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 12, 2026 I'll take this. I'll check the command payload and shell unwrapping on web and mobile, then add regression tests for the quoted glob example. Command execution will stay unchanged.
Thank you!
Before submitting
Area
apps/web
Steps to reproduce
The copied command contains altered quoting around
!node_modulesand fails with a zsh error. The command originally submitted to the shell succeeds.Expected behavior
The command activity row should display the exact command Codex executed. Copying it should produce a valid command with the original quoting preserved.
Here I tested it using the Claude provider, it shows correctly:

Actual behavior
The command runs successfully, but the activity row displays the shell launcher's escaped version instead of the command Codex executed. Single-quoted arguments are altered, so copying the displayed text produces an invalid command that fails in zsh.
Here I tested it using the Codex provider with the same prompt, it produced

'"'!node_modules'"':Impact
Cosmetic issue
Version or commit
v0.0.41-nightly.20260911.1520
Environment
Linux desktop AppImage, zsh, Codex provider
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response