Skip to content

Conversation

@zanesq
Copy link
Collaborator

@zanesq zanesq commented Dec 18, 2025

Global Default and Session Specific Extensions

Prerequisite for #5937
Branched off #6057

Manually tested all session refresh, recipes, deeplinks, forking and extension installation, loading etc

Bonus: moved extension loading to the backend.

Summary

This PR introduces session-specific extension management, allowing users to enable/disable extensions on a per-session basis without affecting global defaults. Extensions are now loaded dynamically when sessions start, with proper loading feedback and error handling.

Key Changes

Backend

  • Session-specific extension state: Added support for storing and retrieving extension configurations per session
  • Extension loading results: New API endpoints return extension load results when starting/resuming sessions
  • Eager extension loading: Extensions are loaded in the background when sessions start for better performance

Frontend

  • Extension switcher in Hub: Users can now toggle extensions before starting a new chat session
  • Session-specific extension management: Extensions can be enabled/disabled within active sessions without affecting defaults
  • Extension overrides store: New state management for temporary extension overrides when starting sessions from the hub
Kapture.2025-12-18.at.15.32.03.mp4
Screenshot 2025-12-18 at 2 13 38 PM Screenshot 2025-12-18 at 2 13 24 PM

…ession-extensions

* 'zane/working-dir' of github.com:block/goose:
  set as recent dir and use for other new window launches
  change mention popover to use new working dir
  remove verbose logging

# Conflicts:
#	crates/goose-server/src/routes/agent.rs
Resolved conflicts in agent.rs by keeping session-specific extension
loading while incorporating working_dir parameter passing to add_extension.
…sions

* 'main' of github.com:block/goose: (22 commits)
  Disallow subagents with no extensions (#5825)
  chore(deps): bump js-yaml in /documentation (#6093)
  feat: external goosed server (#5978)
  fix: Make datetime info message more explicit to prevent LLM confusion about current year (#6101)
  refactor: unify subagent and subrecipe tools into single tool (#5893)
  goose repo is too big for the issue solver workflow worker (#6099)
  fix: use system not developer role in db (#6098)
  Add /goose issue solver github workflow (#6068)
  OpenAI responses streaming (#5837)
  Canonical models for Providers (#5694)
  feat: add Inception provider for Mercury models (#6029)
  fix old sessions with tool results not loading (#6094)
  Fix community page mobile responsiveness and horizontal overflow (#6082)
  Tool reply meta (#6074)
  chore: avoid accidentally using native tls again (#6086)
  Update vars to be capitalised to be in line with other variables in config file (#6085)
  docs: restructure recipe reference (#5972)
  docs: configure custom providers (#6044)
  docs: Community All-Stars Spotlight November 2025, CodeTV Hackathon edition (#6070)
  fix: include file attachments in queued messages (#5961)
  ...

# Conflicts:
#	crates/goose-server/src/routes/agent.rs
#	crates/goose/src/agents/extension_manager.rs
#	ui/desktop/src/api/sdk.gen.ts
…ession-extensions

* 'zane/working-dir' of github.com:block/goose:
  Add working dir to MOIM (#6081)

# Conflicts:
#	ui/desktop/src/api/sdk.gen.ts
Merged upstream changes that:
- Store working_dir on Agent with set_working_dir()/get_working_dir() methods
- Simplify add_extension() to not take working_dir parameter
- Pass workingDir explicitly to createSession() and startNewSession()
- Add utils/workingDir.ts for getInitialWorkingDir()

Preserved session-extensions functionality:
- Keep persist_session_extensions() for session-specific extension tracking
- Keep extension_overrides support for hub view
- Renamed newChatState.ts to extensionOverrides.ts (only handles extensions now)
- Session extensions are stored in session.extension_data and restored on resume
…ession-extensions

* 'zane/working-dir' of github.com:block/goose:
  upstream merge fix
  Enhanced PostHog Error Tracking with Detailed Messages (#6176)

# Conflicts:
#	crates/goose-server/src/routes/agent.rs
#	crates/goose-server/src/routes/agent_utils.rs
#	ui/desktop/src/App.tsx
}
})?;

// Eagerly start loading extensions in the background
Copy link
Collaborator Author

@zanesq zanesq Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're now loading extensions on the backend when starting a chat I moved extension loading to a background task to speed things up.


// Use route state if available, otherwise use captured state
const initialMessage = routeState.initialMessage || capturedInitialMessage;
// Session ID and initialMessage come from route state (Hub, fork) or URL params (refresh, deeplink)
Copy link
Collaborator Author

@zanesq zanesq Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned this up a bit more by starting the session in hub for hub chats and moving sessionId and initialMessage to routeState, also so we can navigate to pair quicker from hub.

Ask goose
</Button>
) : (
<div className="flex gap-2">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to show copy button always

[ChatState.WaitingForUserInput]: 'goose is waiting…',
[ChatState.Compacting]: 'goose is compacting the conversation...',
[ChatState.Idle]: 'goose is working on it…',
[ChatState.RestartingAgent]: 'restarting agent...',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New status to show agent is restarting in chat when extensions are changed, any messages sent while restarting will be queued and sent after its done.

capabilities using three main components: Prompts, Resources, and Tools. ⌘F/Ctrl+F to
search.
</p>
<p className="text-sm text-text-muted mb-6">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New copy on extensions page explaining these are defaults for new chats

@zanesq zanesq changed the title Global Default vs Session Specific Extensions Session Specific Extensions Dec 18, 2025
<CardHeader>
<CardTitle className="flex items-center gap-2">
{getFriendlyTitle(extension)}
{isPendingActivation && (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for pending states anymore now extension loading on backend

| 'recipes'
| 'permission';

// TODO(Douwe): check these for usage, especially key: string for resetChat
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through these indeed resetChat is no longer needed

@zanesq zanesq requested a review from DOsinga December 18, 2025 23:41
@zanesq zanesq marked this pull request as ready for review December 18, 2025 23:41
@zanesq zanesq mentioned this pull request Dec 19, 2025
2 tasks
@zanesq zanesq merged commit 616ab9e into zane/working-dir Jan 5, 2026
5 checks passed
@zanesq zanesq deleted the zane/session-extensions branch January 5, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants