Why Did My Sandbox Output Get Truncated?

Last updated: March 21, 2026

When a tool result (from an integration call, file read, web scrape, etc.) exceeds a character limit, the agent automatically saves the full output to a file in the sandbox and shows you a shortened preview instead. This happens within a single conversation — the full data is not lost, it's just been moved to a file your agent can still access.


Why This Happens

Every tool your agent uses (reading a spreadsheet, scraping a webpage, querying a database, etc.) returns a result. That result goes into the agent's context window — the working memory it uses to reason and respond.

If a tool result is very large (e.g., a spreadsheet with hundreds of rows, or a long webpage), putting all of it into the context window would waste tokens and potentially cause the agent to lose track of other important details in the conversation.

To prevent this, results that exceed a character threshold are automatically spilled: the full content is saved to a file, and the agent receives a truncated preview with instructions on how to access the rest.

What the Thresholds Are

Tool type

Threshold

What happens above it

Most tools (integration calls, file reads, web scrapes, etc.)

8,000 characters

Full result saved to file; agent sees a head + tail preview

sandbox_python (output from Python scripts)

40,000 characters

Full output saved to file; agent is told to rewrite the script to produce smaller output

These thresholds are set by the platform and cannot be changed by users.

What the Preview Looks Like

When truncation happens, the agent sees something like this in its tool result:

[first ~2,000 characters of the result]

━━━ OUTPUT TOO LARGE (51,736 characters, ~420 lines) ━━━
Full result saved to: /home/user/.spillover/scrape_toolu_01HK3P...fd.txt
Format: JSON object with schema: {title: str, body: str, ...}
...instructions for accessing the full file...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[last ~1,000 characters of the result]

The preview includes:

  • The first ~2,000 characters (the "head")

  • The last ~1,000 characters (the "tail")

  • The file path where the full content is saved

  • A format hint (e.g., "JSON array with 50 items" or "plain text") so the agent knows how to parse it

  • Instructions for the agent on how to read the full file without triggering another truncation

Where the Full Output Goes

The full, untruncated result is saved to /home/user/.spillover/ in the sandbox. This is a hidden directory (starts with .), so it doesn't show up in normal file listings, but the agent can read from it using Python scripts or grep.

The file stays available for the rest of the current conversation. Since .spillover/ is a hidden directory, it does not persist to your next conversation — but within the current conversation, it's always accessible.

What Your Agent Does About It

In most cases, you don't need to do anything. The agent is instructed to:

  1. Read the preview to understand the structure and format of the data

  2. Write a targeted Python script that opens the spillover file, extracts only the relevant parts, and prints a smaller result

  3. Use the extracted data to answer your question or complete the task

For example, if a Google Sheets read returned 500 rows and got truncated, the agent might write a script that opens the spillover file, filters to only the rows it needs, and prints just those.

When You Might Notice This

  • The agent mentions "the output was too large" or references a .spillover/ file

  • You see ━━━ OUTPUT TOO LARGE ━━━ in the agent's tool call results

  • The agent runs a follow-up Python script to process a file it just saved

All of this is normal behavior. The agent is designed to handle truncation automatically.

If the Agent Isn't Handling It Well

Occasionally, the agent might not extract the right data from the spillover file, or might seem confused. You can help by being specific:

  • Instead of: "Show me all the data from that spreadsheet"

  • Try: "From that spreadsheet, show me only the rows where the status column is 'Overdue'"

The more specific your request, the better the agent can target its extraction from the full file.

Related Docs

Still Need Help?

If this didn't resolve your issue, reach out to support at support@gumloop.com.