Skip to content

Conversation

@DOsinga
Copy link
Collaborator

@DOsinga DOsinga commented Oct 16, 2025

Summary

compaction itself ran out of tokens because of how we created the thing to compact. we did not filter out the agent invisible messages, which basically means that after a few compaction turns you run out of space since we kept sending the already compacting messages over.

the other issue is that we would send raw json of the messages, including the id, visibility and everything which also uses 60% more tokens than this PR

let content_parts: Vec<String> = msg
.content
.iter()
.map(|content| match content {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is obviously a big improvement and we should do it.

how do we make sure we aren't removing something important here and then seeing decreased quality of compaction?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all that noise around its and syntax adds a lot of overhead, so hard to imagine a world in which this isn't better all round (even ignoring it actually working beyond one compaction!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a bunch of compaction to the scenario tests, large-ish conversation, compaction and then needline in the haystack? /cc @katzdave

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. And would like some LLMish judge tests, to at least have high level sanity checks that we don't forget key information.

@michaelneale
Copy link
Collaborator

trying this out

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tentative approve - this has succeeded where all others so far have failed in recent memory

@DOsinga DOsinga merged commit 0ffd29c into main Oct 16, 2025
11 checks passed
@DOsinga DOsinga deleted the skip-hidden-real-format-compaction branch October 16, 2025 02:09
michaelneale added a commit that referenced this pull request Oct 16, 2025
* main:
  Skip hidden & real format (#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (#5184)
  docs: prompt injection detection (#5193)
  Fix mcp large response race condition (#5065)
  Compaction overhaul (#5186)
  fix: #3960 better approach to input schema for dynamic task params (#5189)
  used recipe id or deeplink to start agent (#5154)
  [docs] Add Blog Post: "Designing AI for Users, Not Just LLMs" (#5190)
  docs: update cognee, jetbrains, mbot extensions config (#5172)
  Minimally disable subagents when not in autonomous model (#5149)
  Fix provider sort (#5188)
  blog: Getting Started with Goose on Windows (#5156)
  feat: add CI/CD Pipeline recipe (#5183)
  feat: add Daily Standup Report Generator recipe (#5123)  (#5131)
  Sort providers in alphabetical vs random (#5090)
  Declarative providers (#5084)
  adding youtube link to firecrawl mcp tutorial, merge after 9am Eastern Oct 15 (#5173)
  Ollama integration: modified default model + added models  (#5153)
  Fix codex subagent configuration in documentation (#5180)
wpfleger96 added a commit to wpfleger96/goose that referenced this pull request Oct 16, 2025
* main:
  Blog: Best Practices for Prompt Engineering with goose (block#5204)
  force WAL sync after session create (block#5202)
  Feat: goose Apify MCP integration docs (block#5047)
  feat: enhance goose to search sessions for easy recall (block#5177)
  Skip hidden & real format (block#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (block#5184)
  docs: prompt injection detection (block#5193)
  Fix mcp large response race condition (block#5065)
@alexhancock alexhancock mentioned this pull request Oct 17, 2025
michaelneale added a commit that referenced this pull request Oct 17, 2025
* main: (119 commits)
  Break compaction back into check_ and do_ compaction (#5212)
  fix: revert built app name to uppercase Goose (#5206)
  feat: add Code Documentation Generator recipe (#5121) (#5125)
  Revert "feat: enhance goose to search sessions for easy recall (#5177)" (#5209)
  Blog: Best Practices for Prompt Engineering with goose (#5204)
  force WAL sync after session create (#5202)
  Feat: goose Apify MCP integration docs (#5047)
  feat: enhance goose to search sessions for easy recall (#5177)
  Skip hidden & real format (#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (#5184)
  docs: prompt injection detection (#5193)
  Fix mcp large response race condition (#5065)
  Compaction overhaul (#5186)
  fix: #3960 better approach to input schema for dynamic task params (#5189)
  used recipe id or deeplink to start agent (#5154)
  [docs] Add Blog Post: "Designing AI for Users, Not Just LLMs" (#5190)
  docs: update cognee, jetbrains, mbot extensions config (#5172)
  Minimally disable subagents when not in autonomous model (#5149)
  Fix provider sort (#5188)
  blog: Getting Started with Goose on Windows (#5156)
  ...
michaelneale added a commit that referenced this pull request Oct 17, 2025
* main: (143 commits)
  Break compaction back into check_ and do_ compaction (#5212)
  fix: revert built app name to uppercase Goose (#5206)
  feat: add Code Documentation Generator recipe (#5121) (#5125)
  Revert "feat: enhance goose to search sessions for easy recall (#5177)" (#5209)
  Blog: Best Practices for Prompt Engineering with goose (#5204)
  force WAL sync after session create (#5202)
  Feat: goose Apify MCP integration docs (#5047)
  feat: enhance goose to search sessions for easy recall (#5177)
  Skip hidden & real format (#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (#5184)
  docs: prompt injection detection (#5193)
  Fix mcp large response race condition (#5065)
  Compaction overhaul (#5186)
  fix: #3960 better approach to input schema for dynamic task params (#5189)
  used recipe id or deeplink to start agent (#5154)
  [docs] Add Blog Post: "Designing AI for Users, Not Just LLMs" (#5190)
  docs: update cognee, jetbrains, mbot extensions config (#5172)
  Minimally disable subagents when not in autonomous model (#5149)
  Fix provider sort (#5188)
  blog: Getting Started with Goose on Windows (#5156)
  ...
zanesq added a commit that referenced this pull request Oct 17, 2025
* 'main' of github.com:block/goose: (22 commits)
  Rewrite extension management tools (#5057)
  fix: re-sync package-lock.json (#5235)
  docs: Hacktoberfest MCP youtube short entry to community-content.json (#5150)
  feat: add schedule button to recipe entries (#5217)
  Autocompact threshold UI cleanup (#5232)
  fix: correct schema for openai tools (#5229)
  Break compaction back into check_ and do_ compaction (#5212)
  fix: revert built app name to uppercase Goose (#5206)
  feat: add Code Documentation Generator recipe (#5121) (#5125)
  Revert "feat: enhance goose to search sessions for easy recall (#5177)" (#5209)
  Blog: Best Practices for Prompt Engineering with goose (#5204)
  force WAL sync after session create (#5202)
  Feat: goose Apify MCP integration docs (#5047)
  feat: enhance goose to search sessions for easy recall (#5177)
  Skip hidden & real format (#5194)
  docs: Hacktoberfest blog submission - Best Practices for Using Goose in Enterprise Environments by Anudhyan Datta. (#5184)
  docs: prompt injection detection (#5193)
  Fix mcp large response race condition (#5065)
  Compaction overhaul (#5186)
  fix: #3960 better approach to input schema for dynamic task params (#5189)
  ...
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.

5 participants