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 | 801eb6a | Commit Preview URL Branch Preview URL |
Aug 13 2026, 06:19 AM |
frostming
reviewed
Aug 13, 2026
| from loguru import logger | ||
| from pydantic import BaseModel, ConfigDict, TypeAdapter, ValidationError, validate_call | ||
|
|
||
| from bub.builtin.spill import SpillStore |
Collaborator
There was a problem hiding this comment.
modules outside of builtin should never import from builtin, please check the hierarchy
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)