fix: IDE launch fails when opening a URI targeting a workspace owned …#324
Merged
Conversation
…by a different user When a Coder URI pointed to a workspace owned by a user other than the one currently authenticated, the IDE would fail to launch with a misleading error claiming no matching IDE version was available. The real problem was that the workspace poller only fetched the authenticated user's own workspaces, so the target workspace never made it into the plugin's environment registry. When the IDE launch tried to inspect that workspace, Toolbox reported it as non-existent, which cascaded into empty IDE lists and the confusing version mismatch error. The fix intercepts URI handling — for both the same-deployment and new-deployment flows, and regardless of whether token, mTLS, or OAuth2 authentication is in use — and scopes the workspace filter to owner:<x> name:<y> before the protocol handler runs. This ensures the poller fetches exactly the target workspace and registers it with Toolbox in time for the IDE launch to succeed. When the URI targets the authenticated user's own workspace, the filter is reset to the default owner:me instead, which also cleans up any leftover non-owned filter from a previous URI. - resolves DEVEX-372 - resolves DEVEX-374
jeremyruppel
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…by a different user
When a Coder URI pointed to a workspace owned by a user other than the one currently authenticated, the IDE would fail to launch with a misleading error claiming no matching IDE version was available. The real problem was that the workspace poller only fetched the authenticated user's own workspaces, so the target workspace never made it into the plugin's environment registry. When the IDE launch tried to inspect that workspace, Toolbox reported it as non-existent, which cascaded into empty IDE lists and the confusing version mismatch error.
The fix intercepts URI handling — for both the same-deployment and new-deployment flows, and regardless of whether token, mTLS, or OAuth2 authentication is in use — and scopes the workspace filter to owner: name: before the protocol handler runs.
This ensures the poller fetches exactly the target workspace and registers it with Toolbox in time for the IDE launch to succeed.
When the URI targets the authenticated user's own workspace, the filter is reset to the default owner:me instead, which also cleans up any leftover non-owned filter from a previous URI.