fix: we load extensions when agent starts so don't do it up front#6350
fix: we load extensions when agent starts so don't do it up front#6350michaelneale merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the desktop app startup by removing unnecessary extension loading that happened on GUI initialization. Extensions are now loaded only when the agent actually starts (i.e., when the user begins interacting), preventing duplicate loading work.
Key changes:
- Removed early extension/session loading from App.tsx on hub page load
- Added duplicate-prevention logic to ExtensionManager to avoid re-adding already loaded extensions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ui/desktop/src/App.tsx | Removed useEffect that pre-loaded chat session and extensions on hub page; removed unused imports and state setters; added explanatory comment |
| crates/goose/src/agents/extension_manager.rs | Added early return in add_extension() to skip re-adding extensions that are already loaded |
DOsinga
left a comment
There was a problem hiding this comment.
nice. does need a bit of post LLM cleaning
|
/goose |
|
Summary: This PR improves startup performance by removing redundant extension loading on GUI start - extensions are now only loaded when the agent actually starts. The approach is sound, though there's some dead code cleanup that could be done. 🟡 Warnings
🟢 Suggestions
✅ Highlights
Review generated by goose |
|
@DOsinga yeah this was a late night hack, I wasn't even sure I was reading things right, can tidy this up for sure. |
|
thanks @DOsinga @tlongwell-block there was even more I could delete! |
codefromthecrypt
left a comment
There was a problem hiding this comment.
code looks best in red
* main: (31 commits) added validation and debug for invalid call tool result (#6368) Update MCP apps tutorial: fix _meta structure and version prereq (#6404) Fixed fonts (#6389) Update confidence levels prompt injection detection to reduce false positive rates (#6390) Add ML-based prompt injection detection (#5623) docs: update custom extensions tutorial (#6388) fix ResultsFormat error when loading old sessions (#6385) docs: add MCP Apps tutorial and documentation updates (#6384) changed z-index to make sure the search highlighter does not appear on modal overlay (#6386) Handling special claude model response in github copilot provider (#6369) fix: prevent duplicate rendering when tool returns both mcp-ui and mcp-apps resources (#6378) fix: update MCP Apps _meta.ui.resourceUri to use nested format (SEP-1865) (#6372) feat(providers): add streaming support for Google Gemini provider (#6191) Blog: edit links in mcp apps post (#6371) fix: prevent infinite loop of tool-input notifications in MCP Apps (#6374) fix: Show platform-specific keyboard shortcuts in UI (#6323) fix: we load extensions when agent starts so don't do it up front (#6350) docs: credit HumanLayer in RPI tutorial (#6365) Blog: Goose Lands MCP Apps (#6172) Claude 3.7 is out. we had some harcoded stuff (#6197) ...
Previously it would load the extensions on GUI start - and then when you start interacting, it would load them any way, this removes that un-necessary initial load.