My agents are telling me there is no possible way so see the full output of 20k-40k character Shell tool results.
Steps to Reproduce
Prompt the agent to confirm this behavior:
Shell tool call output gets truncated to 20k characters. A spill file gets created at 40k characters. 20k-40k is a deadzone where there is no way to recover the toolcall output. Can you confirm this is an issue in your current environment?
Expected Behavior
At 20k, where truncation starts, always create a spill file and tell the agent where it is instead of completely dropping the output.
Hey, thanks for the detailed report. Your diagnosis is correct. In the CLI, the inline output from the shell tool gets cut off at 20k, and the overflow file is only created when the output goes over 40k, so the chunk between 20k and 40k really gets lost with no way to recover it. I’ve reported this bug internally. I can’t share an ETA for a fix yet, but I’ll post an update in the thread once I have one.
For now, a workaround is to redirect the command output to a file and read it back:
your-command > /tmp/out.txt 2>&1
Then read /tmp/out.txt. Or try to keep individual command output under about 20k using | head, --quiet, or narrower filters.
Let me know if this workaround doesn’t fit your case.
Let me know if this workaround doesn’t fit your case.
I would guess a lot of the cases where this shows up are pretty ad hoc. But for one case that I’m facing, I can put this workaround into the skill associated with that task. Thanks!
Quick update: I rechecked on cursor-agent on 2026-09-28. A roughly 29 KB command output is still getting truncated at 20k, and there’s no spill file path, so the 20k to 40k part is still unrecoverable. I’ve passed this to the team again, but it isn’t being actively worked on right now and I don’t have an ETA. Redirecting output to a file is still the workaround. I’ll post here if anything changes.