From 97b84239c541441a6247bd96783ace4bca142dbe Mon Sep 17 00:00:00 2001 From: ocervinka Date: Fri, 1 May 2026 16:25:31 +0100 Subject: [PATCH 1/2] feat(acp): add GOOSE_DISABLE_TOOL_CALL_SUMMARY to opt out of per-tool-call summaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ACP server fires an auxiliary `provider.complete_fast` call for every tool invocation to upgrade the synchronous `fallback_title` (tool name + truncated args) into a model-generated short phrase shown in the UI. On rate-limited providers — Code Assist OAuth and Gemini API free tier in particular — this per-tool-call round-trip multiplies the agent's quota footprint and can exhaust burst caps mid-session. Headless ACP integrations that don't surface the title at all still pay the cost. Add an opt-out env var / config key (default off, current behavior preserved) that mirrors the existing `GOOSE_DISABLE_SESSION_NAMING`. When set, the synchronous fallback title remains visible to the client and no extra provider call is fired. Signed-off-by: ocervinka --- crates/goose/src/acp/server.rs | 11 +++++++++++ crates/goose/src/config/base.rs | 1 + documentation/docs/guides/environment-variables.md | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/crates/goose/src/acp/server.rs b/crates/goose/src/acp/server.rs index 64af66d7f796..d50ef364ac99 100644 --- a/crates/goose/src/acp/server.rs +++ b/crates/goose/src/acp/server.rs @@ -1431,6 +1431,17 @@ impl GooseAcpAgent { SessionUpdate::ToolCall(initial_tool_call), ))?; + // The block below spawns a per-tool-call provider.complete_fast request to upgrade + // the synchronous fallback_title above with a model-generated phrase. On rate-limited + // providers this auxiliary call is the difference between a session that finishes and + // one that gets throttled, so allow opting out — the client keeps the fallback title. + if Config::global() + .get_goose_disable_tool_call_summary() + .unwrap_or(false) + { + return Ok(()); + } + if let Ok(tool_call) = &tool_request.tool_call { let agent = match &session.agent { AgentHandle::Ready(a) => a.clone(), diff --git a/crates/goose/src/config/base.rs b/crates/goose/src/config/base.rs index 5266c5dc6aeb..23ce3eb41970 100644 --- a/crates/goose/src/config/base.rs +++ b/crates/goose/src/config/base.rs @@ -1019,6 +1019,7 @@ config_value!(GOOSE_PROMPT_EDITOR, Option); config_value!(GOOSE_PROMPT_EDITOR_ALWAYS, Option); config_value!(GOOSE_MAX_ACTIVE_AGENTS, usize); config_value!(GOOSE_DISABLE_SESSION_NAMING, bool); +config_value!(GOOSE_DISABLE_TOOL_CALL_SUMMARY, bool); config_value!(GEMINI3_THINKING_LEVEL, String); config_value!(CLAUDE_THINKING_TYPE, String); config_value!(CLAUDE_THINKING_EFFORT, String); diff --git a/documentation/docs/guides/environment-variables.md b/documentation/docs/guides/environment-variables.md index 7eeaf99ee455..27059d779208 100644 --- a/documentation/docs/guides/environment-variables.md +++ b/documentation/docs/guides/environment-variables.md @@ -232,6 +232,7 @@ These variables control how goose manages conversation sessions and context. | `GOOSE_MAX_BACKGROUND_TASKS` | Sets the maximum number of concurrent background [subagent](/docs/guides/subagents) tasks goose can run at once | Integer (e.g., 1, 5, 10) | 5 | | `CONTEXT_FILE_NAMES` | Specifies custom filenames for [hint/context files](/docs/guides/context-engineering/using-goosehints#custom-context-files) | JSON array of strings (e.g., `["CLAUDE.md", ".goosehints"]`) | `[".goosehints"]` | | `GOOSE_DISABLE_SESSION_NAMING` | Disables automatic AI-generated session naming; avoids the background model call and keeps the default "CLI Session" (goose CLI) or "New Chat" (goose Desktop) | "1", "true" (case-insensitive) to enable | false | +| `GOOSE_DISABLE_TOOL_CALL_SUMMARY` | Disables the per-tool-call AI-generated title shown in the ACP UI; avoids the background `complete_fast` call and keeps the synchronous fallback title (tool name + truncated args). Useful on rate-limited providers (e.g. Code Assist OAuth, Gemini API free tier) where the extra round-trip per tool call exhausts quota. | "1", "true" (case-insensitive) to enable | false | | `GOOSE_PROMPT_EDITOR` | [External editor](/docs/guides/goose-cli-commands#external-editor-mode) to use for composing prompts instead of CLI input | Editor command (e.g., "vim", "code --wait") | Unset (uses CLI input) | | `GOOSE_CLI_THEME` | [Theme](/docs/guides/goose-cli-commands#themes) for CLI response markdown | "light", "dark", "ansi" | "dark" | | `GOOSE_CLI_LIGHT_THEME` | Custom [bat theme](https://github.com/sharkdp/bat#adding-new-themes) for syntax highlighting when using light mode | bat theme name (e.g., "Solarized (light)", "OneHalfLight") | "GitHub" | @@ -273,6 +274,10 @@ export CONTEXT_FILE_NAMES='["CLAUDE.md", ".goosehints", ".cursorrules", "project # Disable automatic AI-generated session naming (useful for CI/headless runs) export GOOSE_DISABLE_SESSION_NAMING=true +# Disable per-tool-call AI-generated titles (saves one provider call per tool invocation; +# useful on rate-limited providers like Code Assist OAuth) +export GOOSE_DISABLE_TOOL_CALL_SUMMARY=true + # Use vim for composing prompts export GOOSE_PROMPT_EDITOR=vim From 4c143ce539d7022fbc08e389955e02935ecc9a89 Mon Sep 17 00:00:00 2001 From: Douwe Osinga Date: Tue, 12 May 2026 15:15:05 -0400 Subject: [PATCH 2/2] chore: strip redundant comment and docs example Signed-off-by: Douwe Osinga --- crates/goose/src/acp/server.rs | 4 ---- documentation/docs/guides/environment-variables.md | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/goose/src/acp/server.rs b/crates/goose/src/acp/server.rs index d50ef364ac99..39f5888e3279 100644 --- a/crates/goose/src/acp/server.rs +++ b/crates/goose/src/acp/server.rs @@ -1431,10 +1431,6 @@ impl GooseAcpAgent { SessionUpdate::ToolCall(initial_tool_call), ))?; - // The block below spawns a per-tool-call provider.complete_fast request to upgrade - // the synchronous fallback_title above with a model-generated phrase. On rate-limited - // providers this auxiliary call is the difference between a session that finishes and - // one that gets throttled, so allow opting out — the client keeps the fallback title. if Config::global() .get_goose_disable_tool_call_summary() .unwrap_or(false) diff --git a/documentation/docs/guides/environment-variables.md b/documentation/docs/guides/environment-variables.md index 27059d779208..085ca622b8f0 100644 --- a/documentation/docs/guides/environment-variables.md +++ b/documentation/docs/guides/environment-variables.md @@ -232,7 +232,7 @@ These variables control how goose manages conversation sessions and context. | `GOOSE_MAX_BACKGROUND_TASKS` | Sets the maximum number of concurrent background [subagent](/docs/guides/subagents) tasks goose can run at once | Integer (e.g., 1, 5, 10) | 5 | | `CONTEXT_FILE_NAMES` | Specifies custom filenames for [hint/context files](/docs/guides/context-engineering/using-goosehints#custom-context-files) | JSON array of strings (e.g., `["CLAUDE.md", ".goosehints"]`) | `[".goosehints"]` | | `GOOSE_DISABLE_SESSION_NAMING` | Disables automatic AI-generated session naming; avoids the background model call and keeps the default "CLI Session" (goose CLI) or "New Chat" (goose Desktop) | "1", "true" (case-insensitive) to enable | false | -| `GOOSE_DISABLE_TOOL_CALL_SUMMARY` | Disables the per-tool-call AI-generated title shown in the ACP UI; avoids the background `complete_fast` call and keeps the synchronous fallback title (tool name + truncated args). Useful on rate-limited providers (e.g. Code Assist OAuth, Gemini API free tier) where the extra round-trip per tool call exhausts quota. | "1", "true" (case-insensitive) to enable | false | +| `GOOSE_DISABLE_TOOL_CALL_SUMMARY` | Disables the per-tool-call AI-generated summary title, keeping the fallback title instead. Saves one provider call per tool invocation. | "1", "true" (case-insensitive) to enable | false | | `GOOSE_PROMPT_EDITOR` | [External editor](/docs/guides/goose-cli-commands#external-editor-mode) to use for composing prompts instead of CLI input | Editor command (e.g., "vim", "code --wait") | Unset (uses CLI input) | | `GOOSE_CLI_THEME` | [Theme](/docs/guides/goose-cli-commands#themes) for CLI response markdown | "light", "dark", "ansi" | "dark" | | `GOOSE_CLI_LIGHT_THEME` | Custom [bat theme](https://github.com/sharkdp/bat#adding-new-themes) for syntax highlighting when using light mode | bat theme name (e.g., "Solarized (light)", "OneHalfLight") | "GitHub" | @@ -274,10 +274,6 @@ export CONTEXT_FILE_NAMES='["CLAUDE.md", ".goosehints", ".cursorrules", "project # Disable automatic AI-generated session naming (useful for CI/headless runs) export GOOSE_DISABLE_SESSION_NAMING=true -# Disable per-tool-call AI-generated titles (saves one provider call per tool invocation; -# useful on rate-limited providers like Code Assist OAuth) -export GOOSE_DISABLE_TOOL_CALL_SUMMARY=true - # Use vim for composing prompts export GOOSE_PROMPT_EDITOR=vim