Skip to content

fix(mcp): treat expired OAuth tokens as signed out and hint ACP re-auth - #693

Merged
SDSLeon merged 1 commit into
masterfrom
fix/mcp-oauth-stale-auth-hint
Sep 3, 2026
Merged

fix(mcp): treat expired OAuth tokens as signed out and hint ACP re-auth#693
SDSLeon merged 1 commit into
masterfrom
fix/mcp-oauth-stale-auth-hint

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Fixes intermittent Antigravity ACP turn failures (MCP load failed for Vercel ... Unauthorized) seen on long-lived threads while MCP settings still shows Connected.

  • McpOAuthService.status() no longer reports expired access tokens without a refresh token as authenticated, so the UI prompts re-auth instead of showing a stale Connected badge.
  • resolveAcpPromptFailureMessage (shared ACP path) appends an actionable hint to MCP 401/Unauthorized turn failures, naming the server when parseable and advising re-auth + a new thread (ACP sessions snapshot MCP headers at session open; generic ACP has no per-turn refresh).

Tests: McpOAuthService.test.ts (+2), session.test.ts (+3). typecheck, lint, fmt clean.

- Report MCP URLs as authenticated only when tokens are valid or refreshable
- Append a re-auth/new-thread hint to ACP prompt failures on MCP 401/Unauthorized
- Cover expired-token status and ACP hint behavior in tests
@SDSLeon
SDSLeon merged commit dc72a33 into master Sep 3, 2026
8 checks passed
@SDSLeon
SDSLeon deleted the fix/mcp-oauth-stale-auth-hint branch September 3, 2026 20:41
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