Skip to content

Keep stored tool outputs within a history budget - #322

Merged
iamwavecut merged 1 commit into
mainfrom
fix/cap-stored-tool-outputs
Dec 4, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/cap-stored-tool-outputs

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

A dialog turn in one chat ran twelve web searches (11-23k characters
each). Their stored outputs re-entered every later prompt while the
message stayed in the 32-message window, because the window counts
visible messages, not tool results. Each later turn in that chat then
failed with "prepared prompt exceeds Engine max_context 73728", so the
bot stopped answering there, draw requests included.

History now caps stored tool outputs: 3000 characters per output and
12000 across the window, newest first. Long strings are cut evenly so
short fields such as a status stay whole; older outputs past the budget
keep only the tool name and ref.

A dialog turn in one chat ran twelve web searches (11-23k characters
each). Their stored outputs re-entered every later prompt while the
message stayed in the 32-message window, because the window counts
visible messages, not tool results. Each later turn in that chat then
failed with "prepared prompt exceeds Engine max_context 73728", so the
bot stopped answering there, draw requests included.

History now caps stored tool outputs: 3000 characters per output and
12000 across the window, newest first. Long strings are cut evenly so
short fields such as a status stay whole; older outputs past the budget
keep only the tool name and ref.
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Messages
📖 Danger checked 1 changed file(s).

Generated by 🚫 dangerJS against 545a39e

@iamwavecut
iamwavecut merged commit 4d2f004 into main Dec 4, 2026
10 of 12 checks passed
@iamwavecut
iamwavecut deleted the fix/cap-stored-tool-outputs branch December 4, 2026 16:38
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.

1 participant