Skip to content

Disable tool pair summarization#7481

Merged
baxen merged 1 commit intomainfrom
baxen/hotfix-tools
Feb 26, 2026
Merged

Disable tool pair summarization#7481
baxen merged 1 commit intomainfrom
baxen/hotfix-tools

Conversation

@baxen
Copy link
Collaborator

@baxen baxen commented Feb 24, 2026

Summary

Disables the tool pair summarization feature via a feature flag while keeping all the code intact.

Changes

  • Added ENABLE_TOOL_PAIR_SUMMARIZATION constant (set to false) in crates/goose/src/context_mgmt/mod.rs
  • Added early return in maybe_summarize_tool_pair() that checks the flag, making the function a no-op when disabled
  • All existing code is preserved — to re-enable, set the constant back to true

Why

Hotfix to turn off tool summarization until stability issues are resolved.

Add ENABLE_TOOL_PAIR_SUMMARIZATION constant set to false to disable
the tool call/response summarization feature. The code is preserved
and can be re-enabled by setting the flag back to true.
Copilot AI review requested due to automatic review settings February 24, 2026 17:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Disables the tool-pair summarization path in goose context management as a hotfix, while leaving the existing summarization implementation in place for later re-enablement.

Changes:

  • Introduces a module-level ENABLE_TOOL_PAIR_SUMMARIZATION constant set to false.
  • Adds an early return in maybe_summarize_tool_pair() so summarization becomes a no-op when disabled.

Comment on lines +517 to +521
// Tool pair summarization is currently disabled via feature flag.
// See ENABLE_TOOL_PAIR_SUMMARIZATION constant above.
if !ENABLE_TOOL_PAIR_SUMMARIZATION {
return None;
}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Because ENABLE_TOOL_PAIR_SUMMARIZATION is a const set to false, the if !ENABLE_TOOL_PAIR_SUMMARIZATION { return None; } makes the rest of this async block statically unreachable, which will trigger an unreachable_code warning (and likely fail CI with -D warnings). Consider gating the code with #[cfg(feature = ...)]/#[cfg(not(...))] or making the flag non-const (e.g., env/config-driven, or an AtomicBool load) so the compiler doesn’t treat the remainder as unreachable.

Copilot uses AI. Check for mistakes.
@baxen baxen added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit b542af5 Feb 26, 2026
24 checks passed
@baxen baxen deleted the baxen/hotfix-tools branch February 26, 2026 17:57
zanesq added a commit that referenced this pull request Feb 26, 2026
…m-cache

* 'main' of github.com:block/goose:
  fix: replace unwrap() with graceful error in scheduler execute_job (#7436)
  fix: Dictation API error message shows incorrect limit (#7423)
  fix(acp): Use ACP schema types for session/list (#7409)
  fix(desktop): make bundle and updater asset naming configurable (#7337)
  fix(openai): preserve order in Responses API history (#7500)
  Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485)
  feat(ui): implement fullscreen and pip display modes for MCP Apps (#7312)
  Disable tool pair summarization (#7481)
benthecarman pushed a commit to benthecarman/goose that referenced this pull request Feb 27, 2026
tlongwell-block added a commit that referenced this pull request Feb 27, 2026
…patible

* origin/main: (70 commits)
  feat: allow goose askai bot to search goose codebase (#7508)
  Revert "Reapply "fix: prevent crashes in long-running Electron sessions""
  Reapply "fix: prevent crashes in long-running Electron sessions"
  Revert "fix: prevent crashes in long-running Electron sessions"
  fix: replace unwrap() with graceful error in scheduler execute_job (#7436)
  fix: Dictation API error message shows incorrect limit (#7423)
  fix(acp): Use ACP schema types for session/list (#7409)
  fix(desktop): make bundle and updater asset naming configurable (#7337)
  fix(openai): preserve order in Responses API history (#7500)
  Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485)
  feat(ui): implement fullscreen and pip display modes for MCP Apps (#7312)
  fix: prevent crashes in long-running Electron sessions
  Disable tool pair summarization (#7481)
  fix: New Recipe Warning does not close on cancel (#7524)
  The client is not the source of truth (#7438)
  feat: support Anthropic adaptive thinking (#7356)
  copilot instructions: reword no prerelease docs (#7101)
  fix(acp): don't fail session creation when model listing is unavailable (#7484)
  feat: simplify developer extension (#7466)
  feat: add goose-powered release notes generator workflow (#7503)
  ...

# Conflicts:
#	Cargo.lock
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.

3 participants