feat: spill oversized tool results to tape - #278
Draft
PsiACE wants to merge 7 commits into
Draft
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bub | 7a18bd0 | Commit Preview URL Branch Preview URL |
Aug 14 2026, 04:39 AM |
frostming
reviewed
Aug 13, 2026
frostming
force-pushed
the
feat/tool-result-spill
branch
from
August 14, 2026 04:37
801eb6a to
7a18bd0
Compare
frostming
reviewed
Aug 14, 2026
| @hookspec | ||
| def provide_tape_sidecars(self) -> list[TapeSidecar]: | ||
| """Provide capabilities backed by sibling tapes mounted on every session tape.""" | ||
| raise NotImplementedError |
Collaborator
There was a problem hiding this comment.
This can be implemented multiple times, no need to return a list
| continue | ||
| result.append(filename) | ||
| return result | ||
| return sorted(file.stem for file in self._directory.glob("*.jsonl")) |
Collaborator
There was a problem hiding this comment.
This will count in archives as well, maybe give sidecars some special marks in the filename
| """Runtime context passed to tools that opt into context.""" | ||
|
|
||
| tape: Tape | ||
| tape: Any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Store oversized string tool results in a sibling spill tape and keep only a bounded preview in the session tape. Models retrieve stored content in bounded pages with
spill.read, so large payloads remain available without expanding later model contexts.Tape sidecars are mounted through the new
provide_tape_sidecarshook. The builtinSpillStoreis the first provider and reuses the activeTapeStore, so SQLite and other storage plugins need no changes. The main tape handles fork, merge, archive, and reset for every mounted sidecar; sidecar failures do not block it.Spill configuration belongs to its plugin through
spill.thresholdorBUB_SPILL_THRESHOLD. Setting the threshold to0stops new spills while leaving existing handles readable.Checks
uv run ruff check .uv run ruff format --check .uv run mypy srcmake test(293 passed)