GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(coderd): ignore retired OAuth2 scopes such as task:* by ethanndickson · Pull Request #31117 · coder/coder

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Oct 21, 2026

Copy link
Copy Markdown
Member

Closes CODAGT-1422

After upgrading to v2.38, Coder Agents can't connect to Coder's own MCP server if its MCP server config was created before the upgrade. When an admin creates an OAuth2 MCP server config without any scopes, we save the authorization server's entire scopes_supported list and send it on every connect. Before v2.38 that list included the task:* scopes, which #28750 removed. Since #28178, /oauth2/authorize rejects the whole request if it names a scope outside the catalog, so connecting fails with:

'task:*': unknown or unsupported scope

The issue suggests a migration that strips task:* from mcp_server_configs, but I don't think that's the right fix. We can't backport it to 2.38, as main already has migrations past the last one on release/2.38. A config with only task:* scopes would be left with none, and requesting no scope gets you coder:all. The column also holds scopes for third-party MCP servers. Any other OAuth2 client that cached the old scopes_supported would also stay broken, as would every client the next time we remove a scope.

To fix, we'll retire removed scopes rather than delete them. There's now a small list of retired scope names next to the scope catalog, and the authorization server drops those names from a request and grants the rest. RFC 6749 §3.3 lets the server ignore part of the requested scope, and the token response already returns the scope that was issued. Names that were never in the catalog are still rejected, and so is a request of only retired names, so it can't widen into a broader default grant (e.g. coder:all). Existing configs then connect without anyone editing them.

If we'd assumed from the start that scopes get removed, we'd have retired them rather than deleted them, and that's all this does. It fixes the cause rather than the one MCP config symptom, it's code only so it cherry-picks cleanly onto release/2.38, and the next removed scope just moves into the retired list.

Third-party MCP servers that remove a scope will still break Agents the same way, since our MCP client saves the authorization server's scopes_supported instead of following the MCP spec's scope selection. I've left that for a follow-up.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ethanndickson
fix(coderd): ignore retired OAuth2 scopes such as task:*
729fd7b
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

CODAGT-1422

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned ethanndickson Oct 21, 2026
@ethanndickson

ethanndickson commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T07:31:16.899968Z 729fd7b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 729fd7b300

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ethanndickson
ethanndickson marked this pull request as ready for review October 21, 2026 07:28
@ethanndickson
ethanndickson requested a review from ThomasK33 October 21, 2026 07:47
ThomasK33
ThomasK33 approved these changes Oct 21, 2026
View reviewed changes
@ethanndickson
ethanndickson merged commit f69b98a into main Oct 22, 2026
57 of 58 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ethanndickson
ethanndickson deleted the ethan/codagt-1422-retired-oauth2-scopes branch October 22, 2026 05:37
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
@f0ssel f0ssel added the backport label Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ThomasK33 ThomasK33 ThomasK33 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ethanndickson ethanndickson

Labels

backport

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ethanndickson @ThomasK33 @f0ssel
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.