Skip to main content
Large execute_command output is saved to disk so nothing is lost, and the agent gets a preview plus a path to read the full log.

Quick Start

1

Default (spill is already on)

No code change is required — spill is enabled by default.
When the test log overflows, the tool result includes a stdout_artifact path — the agent reads that file for the failing traceback that used to be truncated away.
2

Pin artifacts to a workspace dir

Set PRAISONAI_TOOL_OUTPUT_DIR for cross-session retrieval.
3

Override per call or opt out

Pass spill_dir explicitly, or spill=False for the legacy middle-truncated preview.

How It Works


Configuration Options

The directory resolves in this order: spill_dir argument, then PRAISONAI_TOOL_OUTPUT_DIR, then <system temp>/praisonai_tool_output/.
Result-dict fields stdout_artifact and stderr_artifact (absolute paths) appear only when overflow occurs with spill=True.

What the Agent Sees

When spill fires, the preview keeps the head and tail with a pointer line in the middle:

Retrieval

The agent reads the omitted region straight from the artifact path.

Best Practices

The buried middle is where errors live — a failing assertion or stack trace hides inside verbose build/test output.
Set a workspace-scoped dir to keep artifacts across runs; leave it unset for auto-cleanup on process exit.
Opt out only when a caller pins the old middle-truncated preview with no persistence.
Artifacts are plaintext on disk — avoid commands that print credentials or tokens.

Shell Agent

Run shell commands with execute_command

Tool Output Store

Recover full outputs for arbitrary tool return values

Context Per-Tool Budgets

Per-tool truncation limits