-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Compaction overhaul #5186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compaction overhaul #5186
Conversation
jamadeo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of the smaller comments I'll put up a follow-up for. But the one about saving the new compacted conversation on user request seems maybe important?
| Ok(AgentEvent::McpNotification(_)) | Ok(AgentEvent::ModelChange { .. }) => {} | ||
| Ok(AgentEvent::HistoryReplaced(updated_conversation)) => { | ||
| conversation = updated_conversation; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean sub-agents never compacted?
| preserve_last_user_message: bool, | ||
| threshold_override: Option<f64>, | ||
| session_metadata: Option<&crate::session::Session>, | ||
| ) -> std::result::Result<(bool, Conversation, Vec<usize>, Option<ProviderUsage>), anyhow::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this return AutoCompactionResult?
| .await | ||
| .map_err(|e| anyhow::anyhow!("Failed to ensure usage tokens: {}", e))?; | ||
|
|
||
| std::prelude::rust_2015::Ok(Some((response, provider_usage))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange qualifier here
| ) | ||
| .await | ||
| .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; | ||
| // TODO(Douwe): store into db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems important! I guess right now the new conversation will be on the client, and then on the next message we'll do the replacement in the agent reply handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's how it works. we'll probably print a warning in the reply that the format is unexpected and then go on.
…/goose into douwe-dkatz-alexhancock/compaction * 'douwe-dkatz-alexhancock/compaction' of github.com:block/goose: fix: tests related to message metadata
* main: Compaction overhaul (block#5186) fix: block#3960 better approach to input schema for dynamic task params (block#5189) used recipe id or deeplink to start agent (block#5154)
* 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)
* 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) ...
* 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) ...
* '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) ...
No description provided.