From f9c01e905b34c897fd3898f7661e7a8de0424f83 Mon Sep 17 00:00:00 2001 From: filip <44206832+filipkujawa@users.noreply.github.com> Date: Wed, 16 Sep 2026 23:50:03 +0000 Subject: [PATCH] fix(todo): make todo opt-in and soften its prompts (#12123) --- crates/goose-cli/src/session/output.rs | 3 +- .../src/agents/platform_extensions/mod.rs | 2 +- .../src/agents/platform_extensions/todo.rs | 38 ++++++++----------- ...nager__tests__all_platform_extensions.snap | 16 +++----- .../docs/getting-started/using-extensions.md | 2 +- documentation/docs/mcp/todo-mcp.md | 4 +- 6 files changed, 27 insertions(+), 38 deletions(-) diff --git a/crates/goose-cli/src/session/output.rs b/crates/goose-cli/src/session/output.rs index ee0385f78..70d53164b 100644 --- a/crates/goose-cli/src/session/output.rs +++ b/crates/goose-cli/src/session/output.rs @@ -2,6 +2,7 @@ use crate::session::builder::ExtensionFailure; use anstream::{adapter::strip_str, eprintln, println}; use bat::WrappingMode; use console::{measure_text_width, style, Color, StyledObject, Term}; +use goose::agents::platform_extensions::todo::TODO_WRITE_TOOL_NAME_COMPLETE; use goose::config::Config; use goose::conversation::message::{ ActionRequiredData, Message, MessageContent, SystemNotificationContent, SystemNotificationType, @@ -593,7 +594,7 @@ fn render_tool_request(req: &ToolRequest, theme: Theme, debug: bool) { "execute_typescript" | "execute_code" => render_execute_code_request(call, debug), "delegate" => render_delegate_request(call, debug), "subagent" => render_delegate_request(call, debug), - "todo__write" => render_todo_request(call, debug), + TODO_WRITE_TOOL_NAME_COMPLETE => render_todo_request(call, debug), "load" => {} _ => render_default_request(call, debug), }, diff --git a/crates/goose/src/agents/platform_extensions/mod.rs b/crates/goose/src/agents/platform_extensions/mod.rs index 5159784c5..49d4b06d2 100644 --- a/crates/goose/src/agents/platform_extensions/mod.rs +++ b/crates/goose/src/agents/platform_extensions/mod.rs @@ -51,7 +51,7 @@ pub static PLATFORM_EXTENSIONS: Lazy display_name: "Todo", description: "Enable a todo list for goose so it can keep track of what it is doing", - default_enabled: true, + default_enabled: false, unprefixed_tools: false, hidden: false, client_factory: |ctx| Some(Box::new(todo::TodoClient::new(ctx).unwrap())), diff --git a/crates/goose/src/agents/platform_extensions/todo.rs b/crates/goose/src/agents/platform_extensions/todo.rs index e292149e2..ff17197c7 100644 --- a/crates/goose/src/agents/platform_extensions/todo.rs +++ b/crates/goose/src/agents/platform_extensions/todo.rs @@ -15,6 +15,8 @@ use serde::{Deserialize, Serialize}; use tokio_util::sync::CancellationToken; pub static EXTENSION_NAME: &str = "todo"; +pub const TODO_WRITE_TOOL_NAME: &str = "todo_write"; +pub const TODO_WRITE_TOOL_NAME_COMPLETE: &str = "todo__todo_write"; #[derive(Debug, Serialize, Deserialize, JsonSchema)] struct TodoWriteParams { @@ -37,17 +39,11 @@ impl TodoClient { indoc! {r#" Your todo content is automatically available in your context. - Workflow: - - Start: write initial checklist - - During: update progress - - End: verify all complete - - Template: - - [x] Requirement 1 - - [ ] Task - - [ ] Sub-task - - [ ] Requirement 2 - - [ ] Another task + Use it as brief planning notes for yourself: + - When given a multi-step task, you may jot a short plan + - Update it only if your plan changes + - Items never need to be checked off, closed out, or verified + - Never redo or re-verify completed work because of these notes "#} .to_string(), ); @@ -115,13 +111,13 @@ impl TodoClient { serde_json::to_value(schema).expect("Failed to serialize TodoWriteParams schema"); vec![Tool::new( - "todo_write".to_string(), + TODO_WRITE_TOOL_NAME.to_string(), indoc! {r#" Overwrite the entire TODO content. The content persists across conversation turns and compaction. Use this for: - - Task tracking and progress updates - - Important notes and reminders + - A short plan for a multi-step task, rewritten only when the plan changes + - Durable notes and reminders you want to keep in view WARNING: This operation completely replaces the existing content. Always include all content you want to keep, not just the changes. @@ -164,7 +160,7 @@ impl McpClientTrait for TodoClient { ) -> Result { let session_id = &ctx.session_id; let content = match name { - "todo_write" => self.handle_write_todo(session_id, arguments).await, + TODO_WRITE_TOOL_NAME => self.handle_write_todo(session_id, arguments).await, _ => Err(format!("Unknown tool: {}", name)), }; @@ -190,13 +186,11 @@ impl McpClientTrait for TodoClient { .ok()?; match extension_data::TodoState::from_extension_data(&metadata.extension_data) { - Some(state) if !state.content.trim().is_empty() => { - Some(format!("Current tasks and notes:\n{}\n", state.content)) - } - _ => Some( - "Current tasks and notes:\nOnce given a task, immediately update your todo with all explicit and implicit requirements\n" - .to_string(), - ), + Some(state) if !state.content.trim().is_empty() => Some(format!( + "Planning notes (for your reference; items need not be closed out):\n{}\n", + state.content + )), + _ => Some("Current tasks and notes:\n(none)\n".to_string()), } } } diff --git a/crates/goose/src/agents/snapshots/goose__agents__prompt_manager__tests__all_platform_extensions.snap b/crates/goose/src/agents/snapshots/goose__agents__prompt_manager__tests__all_platform_extensions.snap index 822cf3473..8661969ca 100644 --- a/crates/goose/src/agents/snapshots/goose__agents__prompt_manager__tests__all_platform_extensions.snap +++ b/crates/goose/src/agents/snapshots/goose__agents__prompt_manager__tests__all_platform_extensions.snap @@ -141,17 +141,11 @@ You have these skills at your disposal, when it is clear they can help you solve ### Instructions Your todo content is automatically available in your context. -Workflow: -- Start: write initial checklist -- During: update progress -- End: verify all complete - -Template: -- [x] Requirement 1 -- [ ] Task - - [ ] Sub-task -- [ ] Requirement 2 -- [ ] Another task +Use it as brief planning notes for yourself: +- When given a multi-step task, you may jot a short plan +- Update it only if your plan changes +- Items never need to be checked off, closed out, or verified +- Never redo or re-verify completed work because of these notes ## tom diff --git a/documentation/docs/getting-started/using-extensions.md b/documentation/docs/getting-started/using-extensions.md index 4c0b79b9f..edb2ea860 100644 --- a/documentation/docs/getting-started/using-extensions.md +++ b/documentation/docs/getting-started/using-extensions.md @@ -42,7 +42,7 @@ Platform extensions are built-in extensions that provide global features like co - [Extension Manager](/docs/mcp/extension-manager-mcp): Discover, enable, and disable extensions dynamically during sessions (enabled by default) - [Skills](/docs/guides/context-engineering/using-skills): Discover and load skill instructions from built-in and filesystem skills (enabled by default) - [Summon](/docs/mcp/summon-mcp): Load knowledge sources and delegate tasks to subagents (enabled by default) -- [Todo](/docs/mcp/todo-mcp): Manage task lists and track progress across sessions (enabled by default) +- [Todo](/docs/mcp/todo-mcp): Manage task lists and track progress across sessions - [Top of Mind](/docs/mcp/tom-mcp): Inject persistent instructions into goose's working memory every turn ### Toggling Built-in Extensions diff --git a/documentation/docs/mcp/todo-mcp.md b/documentation/docs/mcp/todo-mcp.md index bcffd3709..f0c9ad7c0 100644 --- a/documentation/docs/mcp/todo-mcp.md +++ b/documentation/docs/mcp/todo-mcp.md @@ -10,7 +10,7 @@ import GooseBuiltinInstaller from '@site/src/components/GooseBuiltinInstaller'; The Todo extension helps goose stay organized by breaking complex work into a series of steps and keeping you updated as it completes each step. -goose automatically knows to use the Todo extension for tasks involving multiple files/components or uncertain scope. At the start of the task, goose will create an internal checklist, read and update progress as it works, and verify that all tasks are completed. +The Todo extension is not enabled by default. Once enabled, goose can jot down a short plan for multi-step tasks and update it if the plan changes. The notes are shown to goose every turn and survive context compaction, but goose is not asked to check items off or re-verify finished work. :::tip You can ask goose to "show me the current todo list" at any time to see what's being tracked. @@ -20,7 +20,7 @@ This tutorial will cover enabling and using the Todo extension. ## Configuration - +