Skip to content

feat: spill oversized tool results to tape - #278

Draft
PsiACE wants to merge 12 commits into
mainfrom
feat/tool-result-spill
Draft

feat: spill oversized tool results to tape#278
PsiACE wants to merge 12 commits into
mainfrom
feat/tool-result-spill

Conversation

@PsiACE

@PsiACE PsiACE commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

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_sidecars hook. The builtin SpillStore is the first provider and reuses the active TapeStore, 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.threshold or BUB_SPILL_THRESHOLD. Setting the threshold to 0 stops new spills while leaving existing handles readable.

Checks

  • uv run ruff check .
  • uv run ruff format --check .
  • uv run mypy src
  • make test (293 passed)
  • Astro website build

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bub 68ed2dc Commit Preview URL

Branch Preview URL
Aug 17 2026, 12:53 AM

Comment thread src/bub/tools.py Outdated
@frostming
frostming force-pushed the feat/tool-result-spill branch from 801eb6a to 7a18bd0 Compare August 14, 2026 04:37
Comment thread src/bub/hooks/specs.py
Comment thread src/bub/store.py Outdated
Comment thread src/bub/tools.py Outdated
Comment thread src/bub/hooks/specs.py Outdated
Comment thread src/bub/builtin/hook_impl.py Outdated
Comment thread src/bub/framework.py Outdated
Co-authored-by: Frost Ming <mianghong@gmail.com>
@frostming

Copy link
Copy Markdown
Collaborator

@copilot rename provide_tape_sidecars to provide_tape_sidecar

Co-authored-by: frostming <16336606+frostming@users.noreply.github.com>

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown

@copilot rename provide_tape_sidecars to provide_tape_sidecar

Fixed in 831e61a.

Copilot AI requested a review from frostming August 17, 2026 00:46
@frostming

Copy link
Copy Markdown
Collaborator

Fixed in 831e61a.

@copilot replace the occurrences of provide_tape_sidecars in docs and tests as well.

Co-authored-by: frostming <16336606+frostming@users.noreply.github.com>

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown

Fixed in 831e61a.

@copilot replace the occurrences of provide_tape_sidecars in docs and tests as well.

Fixed in 68ed2dc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants