Skip to content

fix mcp reauthorization recovery - #432

Merged
deathbyknowledge merged 4 commits into
mainfrom
mcp-issues
Oct 13, 2026
Merged

deathbyknowledge merged 4 commits into
mainfrom
mcp-issues

Conversation

@deathbyknowledge

@deathbyknowledge deathbyknowledge commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

OAuth MCP connections could get stuck as failed when capability discovery or a tool request required renewed sign-in. Publish the authorization URL from the shared OAuth provider, transition the connection to authenticating, and recover the existing server ID after sign-in.

HTTP and SSE requests share one authorization flow per connection, avoiding the SDK's concurrent refresh race. Late 401 responses reuse renewed tokens; ordinary tool calls remain concurrent. Stale discovery results cannot overwrite authorization state.

Refresh retries failed connections and replaces expired sign-in links. If removal fails after closing the live session, refresh rebuilds it from the retained registration and preserves any pending sign-in. A missing registration produces an explicit error.

Calls interrupted by interactive authorization require an explicit retry; downstream tool errors and ordinary HTTP 403 responses retain their existing behavior.

Validation:

  • Repository-wide lint, gateway and integration TypeScript checks passed.
  • Gateway unit suite: 2,697 tests passed; focused MCP suite: 53 tests passed. Regression tests reproduced the missing-session failure and six authorization races on earlier commits.
  • Complete gateway integration suite: 97 tests passed, including a fresh installation with a real HTTP OAuth/MCP fixture covering concurrent renewal and reauthorization on the same server ID.
  • Documentation checks, documentation coverage, and git diff checks passed.

Docs: gsv-manual PR deathbyknowledge/gsv-manual#38

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-432 October 13, 2026 12:26 Destroyed
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Preview removed.

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-432 October 13, 2026 12:35 Destroyed
@deathbyknowledge
deathbyknowledge marked this pull request as ready for review October 13, 2026 12:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

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-13T13:51:47.331395Z e119d22 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61067b687a

ℹ️ 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".

Comment thread workers/gateway/src/kernel/mcp-client.ts Outdated
@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-432 October 13, 2026 12:53 Destroyed
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91f3373710

ℹ️ 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".

Comment thread workers/gateway/src/kernel/mcp-client.ts
@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-432 October 13, 2026 13:42 Destroyed
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e119d227ec

ℹ️ 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".

@deathbyknowledge
deathbyknowledge merged commit 36946a5 into main Oct 13, 2026
18 checks passed
@deathbyknowledge
deathbyknowledge deleted the mcp-issues branch October 13, 2026 13:54

This branch was successfully deployed

No deployments
gsv-preview-pr-432 — e119d227 Deployed Oct 13, 2026 by github-actions[bot]
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.

1 participant