-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Move To-Do Tool to Session Scope from Agent Scope #4157
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
Conversation
katzdave
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.
Looks good, did some testing! Love that now I can pick up my todo list when resuming a session, can we just reduce the branching.
One other thing I noticed is the TODO: READ tool doesn't return any data, which provides a poor experience when resuming a session. Is that an easy fix? If not can follow up with that later.
Also when you pull in main again, make sure to flip it back on, #4158 disabled it.
katzdave
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.
Nice job! Excited to have this back.
| // Add task planner tools | ||
| // TODO: Re-enable after next release | ||
| // prefixed_tools.extend([todo_read_tool(), todo_write_tool()]); | ||
| prefixed_tools.extend([todo_read_tool(), todo_write_tool()]); |
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.
👍
| accumulated_input_tokens: Option<i32>, | ||
| accumulated_output_tokens: Option<i32>, | ||
| working_dir: Option<PathBuf>, | ||
| todo_content: Option<String>, // For backward compatibility |
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.
Assuming this lets us load old sessions from before this feature?
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!
b0bec9b to
9f34d74
Compare
|
dianed-square
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.
Hi @tlongwell-block -- this appears to be overwriting recent /documentation changes that were merged into main
b0bec9b to
31a20e6
Compare
|
Oh boy. Goose borked this branch something fierce. I'll patch it up. Just a minute |
31a20e6 to
b0bec9b
Compare
|
lending my 👍 my support to this, as I really think we are missing out on this (I think that failure needs to run a |
6139bfd to
eb0f557
Compare
* main: docs: Plan tutorial (#4309) Extensions Modal Improvements (#4293) docs: fixed cicd tutorial pipeline in docs (#4223) Read oltp config from config and env (#4292) release/1.6.0 (#4280) docs: fix broken links in Docker tutorial (#4285) Remove half-second wait, rework auto submit (#4282) Block send until extensions are ready (#4271) fix: improve OpenAI-compatible error handling and add test coverage (#4175) Move To-Do Tool to Session Scope from Agent Scope (#4157) fix: recipe params not being replaced all the time (#4207) chore: removing little-used session sharing feature (#4249) Stop auto scrolling when agent responds and let scroll area handle scrolling to bottom (#4257) restore cli projects from accidental removal during cleanup (#4266) Fix: deep link extension installation to show dialog for headers configuration (#4150)
* main: (24 commits) feat: autovisualiser of structured data with mcp-ui (#4153) docs: Plan tutorial (#4309) Extensions Modal Improvements (#4293) docs: fixed cicd tutorial pipeline in docs (#4223) Read oltp config from config and env (#4292) release/1.6.0 (#4280) docs: fix broken links in Docker tutorial (#4285) Remove half-second wait, rework auto submit (#4282) Block send until extensions are ready (#4271) fix: improve OpenAI-compatible error handling and add test coverage (#4175) Move To-Do Tool to Session Scope from Agent Scope (#4157) fix: recipe params not being replaced all the time (#4207) chore: removing little-used session sharing feature (#4249) Stop auto scrolling when agent responds and let scroll area handle scrolling to bottom (#4257) restore cli projects from accidental removal during cleanup (#4266) Fix: deep link extension installation to show dialog for headers configuration (#4150) feat: Add message queue system with interruption handling (#4179) Start extensions concurrently (#4234) Add X-Title and referer headers on exchange to tetrate (#4250) docs: update View/Edit Recipe menu item name (#4267) ...
Signed-off-by: Alex Rosenzweig <[email protected]>
Signed-off-by: Dorien Koelemeijer <[email protected]>
Overview
Refactors the TODO tool functionality from agent-scoped (shared across all sessions) to session-scoped (isolated per session). This change provides better data isolation, persistence, and user experience by ensuring each session maintains its own independent TODO list.
Key Changes
Architecture
Arc<Mutex<String>>from Agent struct)todo_content: Option<String>in SessionMetadata)Session Storage
SessionMetadatawithtodo_contentfield.jsonlfilesTool Behavior
GOOSE_TODO_MAX_CHARSenvironment variableBenefits
🔒 Data Isolation
Each session maintains its own TODO list, preventing cross-contamination between different conversations or users.
💾 Persistence
TODO lists survive agent restarts and are automatically saved/restored with session data.
🔄 Backward Compatibility
Existing sessions without TODO content continue to work seamlessly with empty TODO lists.
🧪 Robust Testing
Comprehensive integration test suite covering persistence, isolation, concurrency, and edge cases.
Breaking Changes
Files Changed
crates/goose/src/agents/agent.rs- Core TODO dispatch logiccrates/goose/src/session/storage.rs- Session metadata enhancementcrates/goose/tests/todo_session_integration.rs- New integration testscrates/goose/tests/todo_tools_test.rs- Removed (agent-scoped tests)Testing
This change significantly improves the user experience by providing persistent, isolated TODO lists that follow session boundaries rather than being shared across the entire agent lifecycle.