-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: consolidate subagent execution for dynamic tasks #3444
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
* main: (23 commits) docs: VS Code MCP video (#3307) docs: fixed broken link (#3306) Add YouTube video to Netlify MCP documentation (#3302) docs: add sub-recipes topic (#3241) docs: move topics to tutorials section (#3297) site analytics (#3293) chore(release): release version 1.0.35 (#3292) docs: enhanced code editing topic (#3287) fix cu (#3291) feat: Add environment variables to override model context limits (#3260) chore(release): release version 1.0.34 (#3285) fix(devcontainer): install protoc to fix build (#3267) Enabling npx command to install on Windows Desktop (#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (#3246) chore(release): release version 1.0.33 (#3284) fix Windows Env Vars (#3282) feat: bedrock image content support (#3266) Add support in goose configure for streaming http mcp tools (#3256) docs: add Alby MCP tutorial (#3217) refactor(tests): make logging test in goose-cli less flaky on macos (#3273) ...
* main: feat(gcpvertexai): do HTTP 429 like retries for Anthropic API HTTP 529 overloaded status code (#3026) Fix a few ui edge cases - refresh occasionally crashing, chat loader over text and chat input height returning to auto (#3469) Don't default to main for build-cli (#3467) docs: add MongoDB MCP server tutorial (#2660) feat: run sub recipe multiple times in parallel (Experimental feature) (#3274) chore(release): release version 1.1.0 (#3465) chore: implement streaming for anthropic.rs firstparty provider (#3419) Fix regression: add back detail to tool-call banners (#3231) Document release process and update some just recipes (#3460) feat: add download_cli.ps1 file for windows (#3354) fix: session_file is optional (#3462) Bump more space for goose is working on it so it doesnt overlap incoming agent chat messages (#3453) Align chat input action buttons to bottom when large amount of text (#3455) docs: add Cloudflare MCP Server tutorial (#3278) feat(cli): Clear persisted session file with /clear command (#3145)
lifeizhou-ap
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 @wendytang,
I have pulled the latest version of main branch with my PR change into this branch, and resolved the conflicts. Please check whether there are anything missed after the merge.
The PR looks good to me overall! Great work!
I’ve added a few comments with suggestions.
I’ll approve it now, but it'd be great if you could take a look at the comments and update things before merging. Let me know if you want to chat about anything!
| pub(super) router_tool_selector: Mutex<Option<Arc<Box<dyn RouterToolSelector>>>>, | ||
| pub(super) scheduler_service: Mutex<Option<Arc<dyn SchedulerTrait>>>, | ||
| pub(super) subagent_manager: Mutex<Option<SubAgentManager>>, | ||
| pub(super) mcp_tx: Mutex<mpsc::Sender<JsonRpcMessage>>, |
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.
If I understand correctly, this will be eventually passed to the subagent via the subagent_execute_task_tool
I feel we can reuse the channel here https://github.com/block/goose/blob/wtang/execute_dynamic_tasks/crates/goose/src/agents/subagent_execution_tool/subagent_execute_task_tool.rs#L67 instead
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.
we can address the channel updates as a follow up!
crates/goose/src/agents/subagent_execution_tool/task_execution_tracker.rs
Show resolved
Hide resolved
crates/goose/src/agents/subagent_execution_tool/task_execution_tracker.rs
Show resolved
Hide resolved
| let mcp_tx = self.mcp_tx.lock().await.clone(); | ||
|
|
||
| let task_config = | ||
| TaskConfig::new(provider, Some(Arc::clone(&self.extension_manager)), mcp_tx); |
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.
-
we can add
providerasdefault_providerandextension_managerin thetasks_managerso that we don't need to pass the task_config when run_tasks. -
mcp_tx probably does not need to pass as we can reuse the one inside subagent_execute_task_tool
-
Are we going to pass the
extensionsinstead ofextension_managerlater?
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.
Are we going to pass the extensions instead of extension_manager later?
No turns out we need the extension manager in order to dispatch mcp tool calls
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.
mcp_tx probably does not need to pass as we can reuse the one inside subagent_execute_task_tool
I agree, we can address this afterwards.
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.
Are we going to pass the extensions instead of extension_manager later?
No turns out we need the extension manager in order to dispatch mcp tool calls
Just curious how sub-recipe pass the extensions to the subAgent.rs then? I remember we were planning to have extensions as an attribute of subAgent (eg SubAgent constructor params)
|
merging with follow ups here |
Co-authored-by: Lifei Zhou <lifei@squareup.com> Signed-off-by: Soroosh <soroosh.sarabadani@gmail.com>
…ntral-deeplinks * origin/main: (22 commits) feat: deprecate jetbrains extension in favor of public one (#2589) feat: Add LiteLLM provider with automatic prompt caching support (#3380) docs: update desktop instructions for managing sessions (#3522) docs: update desktop instructions for session recipes (#3521) Replace mcp_core::content types with rmcp::model types (#3500) docs: update desktop instructions for tool perms (#3518) docs: update desktop instructions for tool router (#3519) Alexhancock/reapply 3491 (#3515) docs: update mcp install instructions for desktop (#3504) Docs: Access settings in new UI (#3514) feat: switch from mcp_core::Role to rmcp::model::Role (#3488) Revert "fix the output not being visible issue (#3491)" (#3511) fix: Load and Use recipes in new window (#3501) fix: working dir was not being set correctly (#3477) Fix launching session in new window (#3497) Fix tool call allow still showing initial state in chat after navigating back (#3498) feat: add rmcp as a workspace dep (#3483) feat: consolidate subagent execution for dynamic tasks (#3444) fix token alert indicator/popovers hiding and showing (#3492) Fix llm errors not propagating to the ui and auto summarize not starting (#3490) ...
Co-authored-by: Lifei Zhou <lifei@squareup.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com> Signed-off-by: Adam Tarantino <tarantino.adam@hey.com>
New: Dynamic Task Creation Tool:

SubAgent parallel execution with Task framework (instead of > goose run ...):

Summary of Changes:
Going forward, TaskConfig can be the handoff between recipe and subagent.
Implements the dynamic task tool and subagent execution in diagram:
