Harness interrupting shell execution and/or truncating output

Resolved 💬 3 comments Opened Nov 16, 2025 by miklschmidt Closed Jan 17, 2026

What version of Codex is running?

0.58.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.1-codex

What platform is your computer?

NixOS - Linux 6.12.52 x86_64 unknown

What issue are you seeing?

Agent harness is killing shell processes after a certain amount of output, preventing a lot of shell operations and causing the model to try and log output to a file, of course that gets killed too. Eventually it gives up and asks for help. This causes a lot of wasted tokens (which seem to be growing in value by the day..) and eventually prevents codex from doing it's job. I've observed this in several cases, even while running plain scripts written by codex as part of solving a task. In this case it failed to run the test suite.

What steps can reproduce the bug?

Uploaded thread: 019a88eb-179c-7f23-a4ae-c2c8446e5e82

What is the expected behavior?

Purely going off of what the model tells me here, i haven't read the particular part of the code that handles this. But my general expectation would be that the harness doesn't kill processes once the arbitrary (and apparently not configurable by the model) timeout is reached. I would also expect it be smarter about truncation, usually the last part of the output is the most important, maybe let the model inspect it in chunks if it's a problem, at least give it something to work with (like a total length of the output). Redirecting the output to a temporary file that's deleted on the next tool call could be an option, maybe be done by default by the tool? Then the model doesn't have to run the same command several times, there are many situations where executing something in the shell isn't an idempotent operation, causing context to be lost.

Additional information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗