What issue are you seeing?
When a shell command running through the Codex is interrupted, any output produced before the interruption remains visible in the “Ran command” UI.
However, that output is not included in the tool result returned to the model. The model receives only the elapsed time and interruption status, so it cannot inspect stdout or stderr that is still visible to the user.
In the controlled reproduction below, the user could see the incrementing numbers in the UI, but Codex received only:
Wall time: 9.5 seconds
aborted by user
None of the stdout produced before the interruption was available in the model context.
What steps can reproduce the bug?
- Open a Codex conversation
- Ask Codex to run the following PowerShell command:
$counter = 1
while ($true) {
Write-Output $counter
$counter++
Start-Sleep -Seconds 1
}
- Interrupt the command after several seconds.
- Confirm that
1, 2, 3, and subsequent values appear in the “Ran command” output.
- Ask Codex whether it can read the numbers printed before the interruption.
- Observe that Codex can see only the elapsed time and
aborted by user, not the stdout displayed in the UI.
What is the expected behavior?
Stdout and stderr emitted before a command is interrupted should be preserved in the model-visible tool result, followed by the interruption status.
Normal output truncation would be acceptable, but interrupting a command should not discard all output emitted before the interruption.
The user and the model should have access to the same captured command output.
Additional information
Local Codex CLI: codex-cli 0.145.0
This issue occurs regardless of whether Codex is used through the CLI, the VS Code extension, or the app.
What issue are you seeing?
When a shell command running through the Codex is interrupted, any output produced before the interruption remains visible in the “Ran command” UI.
However, that output is not included in the tool result returned to the model. The model receives only the elapsed time and interruption status, so it cannot inspect stdout or stderr that is still visible to the user.
In the controlled reproduction below, the user could see the incrementing numbers in the UI, but Codex received only:
None of the stdout produced before the interruption was available in the model context.
What steps can reproduce the bug?
1,2,3, and subsequent values appear in the “Ran command” output.aborted by user, not the stdout displayed in the UI.What is the expected behavior?
Stdout and stderr emitted before a command is interrupted should be preserved in the model-visible tool result, followed by the interruption status.
Normal output truncation would be acceptable, but interrupting a command should not discard all output emitted before the interruption.
The user and the model should have access to the same captured command output.
Additional information
Local Codex CLI:
codex-cli 0.145.0This issue occurs regardless of whether Codex is used through the CLI, the VS Code extension, or the app.