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!