File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
crates/goose/src/context_mgmt Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ use tracing::log::warn;
1818
1919pub const DEFAULT_COMPACTION_THRESHOLD : f64 = 0.8 ;
2020
21+ /// Feature flag to enable/disable tool pair summarization.
22+ /// Set to `false` to disable summarizing old tool call/response pairs.
23+ /// TODO: Re-enable once tool summarization stability issues are resolved.
24+ const ENABLE_TOOL_PAIR_SUMMARIZATION : bool = false ;
25+
2126const CONVERSATION_CONTINUATION_TEXT : & str =
2227 "Your context was compacted. The previous message contains a summary of the conversation so far.
2328Do not mention that you read a summary or that conversation summarization occurred.
@@ -509,6 +514,12 @@ pub fn maybe_summarize_tool_pair(
509514 cutoff : usize ,
510515) -> JoinHandle < Option < ( Message , String ) > > {
511516 tokio:: spawn ( async move {
517+ // Tool pair summarization is currently disabled via feature flag.
518+ // See ENABLE_TOOL_PAIR_SUMMARIZATION constant above.
519+ if !ENABLE_TOOL_PAIR_SUMMARIZATION {
520+ return None ;
521+ }
522+
512523 if let Some ( tool_id) = tool_id_to_summarize ( & conversation, cutoff) {
513524 match summarize_tool_call ( provider. as_ref ( ) , & session_id, & conversation, & tool_id) . await
514525 {
You can’t perform that action at this time.
0 commit comments