Skip to content

fix(tools): truncate huge bookend messages in session_search (#43175) - #43267

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43175
Closed

kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43175

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #43175. The session_search discovery mode returned bookend messages without any size limit, allowing 50K+ character compaction summaries to be reintroduced into fresh session prompts. Added _shape_bookend_message() that truncates bookend content at 4000 characters, preventing compression metadata from bloating new sessions.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists labels Jun 10, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #43184 — both fix #43175 by capping session_search bookend content. #43184 is more comprehensive: it filters compaction-summary prefixes and caps bookend (1200) / window (4000) content, with regression tests. This PR only truncates bookends at 4000. Consolidating under #43184.

@kyssta-exe

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #43184 — that PR is more comprehensive (filters compaction summaries AND caps content, with tests). Thanks for the contribution!

@kyssta-exe kyssta-exe closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session_search discovery can rehydrate huge compaction summaries via bookends

2 participants