coder / coder/vscode-coder

Deep links do not work when the URI is handled by an agent window

オープン
#1,087 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug upstream
主要言語
TypeScript
スター
130
フォーク
48
平均マージ
3日 3時間
マージ済み PR(30日)
15

説明

## Summary

`coder://` / `vscode://coder.coder-remote/open?...` deep links silently do nothing when the editor routes the URI to an "agent window" (VS Code Agents window, Cursor Agents window / Glass). These windows run a restricted extension host that does not load third-party extensions, so the extension is never activated and its registered `vscode.window.registerUriHandler` callback is never invoked.

The renderer logs the URI as handled, so no error is surfaced. The link appears to do nothing.

## Reproduction (as reported for Cursor)

1. Install `coder.coder-remote` 1.15.2.
2. Start Cursor 3.14.7 on Linux with a clean `HOME` and the default `~/.cursor/extensions` directory.
3. Open `cursor://coder.coder-remote/open?workspace=test&url=https://coder.example.com`.
4. Repeat after initialization completes.

Observed: `renderer.log` records the URI as handled, but extension-host initialization does not include `coder.coder-remote`, and there is no activation or URI-handler entry. On the repeat attempt, Cursor invokes `workbench.extensions.installExtension` even though the extension is already installed.

Expected: the installed extension is loaded and its `onUri` handler is invoked.

## Upstream reports

- Cursor forum report and vendor response: https://forum.cursor.com/t/installed-extensions-onuri-handler-is-not-invoked-for-custom-uri/167316
- Cursor confirmed this is a known issue in 3.14.7: `cursor://` links for third-party extensions can be handled in the Agents window, where the extension does not load, so `onUri` does not fire. A fix was said to be prepared.
- Stated workaround: make a normal IDE window active before opening the link. If only the Agents window is open, open a new editor window first, then click the link again.
- Related Cursor reports about extensions not loading in the Agents window:
- https://forum.cursor.com/t/extensions-in-agent-window/156603
- https://forum.cursor.com/t/cursor-3-agents-windows-cannot-load-wsl-extension/156778
- https://forum.cursor.com/t/swift-extension-does-not-activate-in-the-glass-mode/166987
- VS Code has shipped its own Agents window
(https://code.visualstudio.com/docs/agents/run/agents-window), which has the same restricted extension host. Related upstream issues:
- microsoft/vscode#315776 "Can extensions detect that they are running in the agents window"
- microsoft/vscode#315637 "Add a 'Enable in Agent window' in extensions view"
- microsoft/vscode#317460 "Agents Window: MCP server contributed by extension is not available"

## Why this matters

Deep links are the primary entry point from the Coder dashboard ("Open in VS Code" / "Open in Cursor"). If the user's active or only window is an agent window, the flow fails with no feedback.

## Scope

Tracking. The root cause is in the editor, not in this extension, so the work here is likely limited to:

1. Confirming which editors and versions are affected (VS Code stable/insiders, Cursor, Devin, VSCodium).
2. Confirming whether the Cursor fix has shipped and in which version.
3. Deciding whether to document the workaround in the README or in the Coder docs deep-link section.
4. Investigating whether anything in `package.json` (for example an explicit `onUri` activation event, or extension kind metadata) changes whether the extension is loaded in these windows.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with package.json to inspect the activation event and extension kind metadata. Reproduce the deep-link behavior in the listed VS Code, Cursor, Devin, and VSCodium scenarios, and check whether the Cursor fix has shipped. Done means the affected versions are documented and the workaround is placed in the README or Coder deep-link documentation, unless metadata provides a viable change.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript, vscode
領域
developer-experience
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。