Skip to content

feat(desktop): add goose://new-session deep link to open fresh chat - #9196

Merged
DOsinga merged 1 commit into
mainfrom
fix/6509-new-session-deeplink
May 14, 2026
Merged

feat(desktop): add goose://new-session deep link to open fresh chat#9196
DOsinga merged 1 commit into
mainfrom
fix/6509-new-session-deeplink

Conversation

@DOsinga

@DOsinga DOsinga commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add support for the goose://new-session deep link URL scheme so that opening this URL always creates a fresh chat window in the desktop app, rather than focusing the most recent session.

This enables desktop widgets, keyboard shortcuts (Alfred/Raycast), Apple Shortcuts, and other automation tools to launch new Goose sessions without going through a terminal.

Changes

Single file change in ui/desktop/src/main.ts — adds new-session hostname handling in the three existing protocol URL dispatch points:

  1. second-instance handler (Windows/Linux) — creates a new chat window and returns early
  2. handleProtocolUrl (shared handler) — creates a new chat window, clears pending deep link, returns
  3. open-url event (macOS) — creates a new chat window and returns early

Each follows the same pattern already used for bot/recipe deep links.

Testing

  • pnpm lint
  • tsc --noEmit
  • Manual: open goose://new-session on macOS should open a fresh chat window

Closes #6509

Handle the 'new-session' hostname in all three protocol URL dispatch
points (second-instance for Windows/Linux, handleProtocolUrl shared
handler, and open-url for macOS) so that opening goose://new-session
always creates a new chat window instead of focusing the last session.

Closes #6509

Signed-off-by: Douwe Osinga <douwe@squareup.com>

@alexhancock alexhancock left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: i would add an optional initial message param, so a message could be written elsewhere and then kick off a session with it.

we used to have a separate little launcher window that let us do this. unsure if we still do.

@DOsinga

DOsinga commented May 14, 2026

Copy link
Copy Markdown
Collaborator Author

nit: i would add an optional initial message param, so a message could be written elsewhere and then kick off a session with it.

we used to have a separate little launcher window that let us do this. unsure if we still do.

yeah, that would be great. but I think also a bit of a security risk. we have deeplinks for recipes that ask the user to inspect the recipe. I suppose we could not auto-submit?

@DOsinga
DOsinga added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit ae5eae5 May 14, 2026
20 checks passed
@DOsinga
DOsinga deleted the fix/6509-new-session-deeplink branch May 14, 2026 16:41
lifeizhou-ap added a commit that referenced this pull request May 15, 2026
* main: (102 commits)
  Dynamically refresh skill instructions each turn (#9217)
  Build non-vulkan linux variants using ubuntu 22.04 (#9211)
  fix(ui): show tool name in approval prompt (#9216)
  feat: add Atomic Chat as declarative OpenAI-compatible provider (#9210)
  chore: bump package.json versions from 0.19.1 to 0.20.0 (#9218)
  feat: support GOOSE_OAUTH_CALLBACK_PORT for stable OAuth redirect_uri (#9209)
  [RFC] feat(oauth): proactive token refresh to avoid re-auth on every session (#8386)
  fix: resolve Azure CLI on Windows by using az.cmd (#9215)
  fix: handle non-interactive terminal in goose configure on Windows (#9214)
  Better parsing of pasted html as markdown so agents understand (#9190)
  fix: persist accumulated cost in session DB to survive reload (#9191)
  fix(publish-npm): build binary from current SHA + add compat check (#9212)
  feat(desktop): add goose://new-session deep link to open fresh chat (#9196)
  Add PR previews using cloudflare pages (#9208)
  fix: prevent tool-use marker leakage in toolshim output (#8310)
  Prompt injection mitigation: update pattern-based detection (#9198)
  remove goose2 related skills (#9189)
  Switch GH pages deploy to actions/artifact workflow (#9025)
  fix(summon): re-apply canonical limits when delegate overrides model (#9183)
  Split code signing from build (#8587)
  ...
shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
…aif-goose#9196)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
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.

deep link support for starting new goose desktop sessions

2 participants