CostAffective
Back to Tools Overview
stash_context tool

Tool: stash_context

Park a large blob (a whole file, a long command or test output, a generated report) out of the conversation and get back a short handle. Nothing is lost: the full content is written to disk and remains re-fetchable with recall. This is the most direct lever on context-window size.

Arguments Schema

ParameterTypeRequiredDescription
repo_pathstringRequiredAbsolute path to the workspace root.
contentstringRequiredThe large text to stash out of context.
labelstringOptionalOptional short label describing the content.
Tool Input JSONRequest
{
  "repo_path": "/path/to/repo",
  "content": "<5,000 lines of build log>",
  "label": "ci-build-log"
}
Tool Response JSONResponse
Stashed "ci-build-log" -> a1b2c3d4e5f6 (~18000 tokens kept out of context). Read only what you need with recall(source="a1b2c3d4e5f6", query=...).

Developer Best Practices

  • Stash large output instead of pasting it inline, where it would be re-cached every turn.
  • Then use recall with the handle to pull back only the slice you actually need.