Repository navigation
Description
Before submitting
- I searched existing issues and did not find an open report for this regression.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web (also used by the Windows desktop client)
Steps to reproduce
- Open T3 Code on Windows with PowerShell 7 installed and start a thread with the Codex provider.
- Ask Codex to run
Get-Date -Format 'yyyy-MM-dd HH:mm:ss'using its shell tool. - Expand the turn's work log and command group if needed. Look at the command row before opening its details.
Expected behavior
The collapsed row starts with Get-Date -Format 'yyyy-MM-dd HH:mm:ss'. The expanded details and copy action can retain the original invocation.
Actual behavior
The command succeeds, but the collapsed row starts with "C:\\Program Files\\PowerShell\\7\\pwsh.exe" -Command .... The launcher takes up the start of each row and makes the actual commands hard to scan or see before truncation.
Impact
Minor bug or occasional failure
Version or commit
Reproduced in the Windows desktop app on 0.1.11-nightly.20261118.4903 (6927cfe2adb0). I also ran commandDisplayText in isolation from that tag, v0.1.10, and main; all three kept the PowerShell wrapper on the same input.
Environment
Windows 11 24H2 x64 (build 26100.9711), PowerShell 7, Codex CLI/App Server 0.170.0.
Logs or stack traces
The current T3 session and a standalone run of the same Codex binary with an empty CODEX_HOME emitted identical command fields. The standalone run exercised turn/start → exec_command using a local mock model response, with no T3 or user Codex configuration involved. Minimal item/completed.params.item excerpt:
{
"type": "commandExecution",
"command": "\"C:\\\\Program Files\\\\PowerShell\\\\7\\\\pwsh.exe\" -Command \"Get-Date -Format 'yyyy-MM-dd HH:mm:ss'\"",
"commandActions": [
{
"type": "unknown",
"command": "Get-Date -Format 'yyyy-MM-dd HH:mm:ss'"
}
],
"exitCode": 0
}Workaround
Open the individual command row to read the full command and output.
Suggested fix
This is a regression of #1671 (fixed by #1719). In #2829, the new work-log projection started using item.input as the command text, and the shared commandDisplayText unwraps POSIX shells but leaves Windows PowerShell wrappers intact. See session-logic.ts and commandLabel.ts.
Restore Windows wrapper handling for collapsed previews. For a recognized PowerShell invocation whose single commandActions entry contains the complete inner script, that field is an option for the preview. Alternatively, restore PowerShell -Command unwrapping in the shared formatter, falling back to the original text when parsing is ambiguous. Keep the raw invocation available in expanded details and copy actions.
A regression test can feed the quoted full-path pwsh.exe -Command string above to the collapsed preview and assert that it starts with Get-Date.
Activity