Skip to content

fix(oauth): preserve auth failure context#97

Open
mavam wants to merge 1 commit intosteipete:mainfrom
mavam:topic/fix-oauth
Open

fix(oauth): preserve auth failure context#97
mavam wants to merge 1 commit intosteipete:mainfrom
mavam:topic/fix-oauth

Conversation

@mavam
Copy link

@mavam mavam commented Mar 10, 2026

Problem

OAuth retries were losing the context of where a failure happened. That could hide terminal provider errors behind an unnecessary SSE fallback or retry flows that no longer had a real auth challenge to complete.

Fix

  • track OAuth flow failures separately from post-auth reconnect failures
  • recreate Streamable HTTP transports after finishAuth() before reconnecting
  • keep legacy SSE fallback scoped to real 404/405 transport mismatches
  • add regression coverage for generic 401 promotions and auth retry paths

Testing

  • ./runner pnpm check
  • ./runner pnpm test

Copy link

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

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: a552a59725

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

Track OAuth flow failures separately from post-auth reconnect
failures so Streamable HTTP can still fall back to legacy SSE
on real 404/405 transport mismatches without masking terminal
provider errors.

Also recreate transports after finishAuth and add regression
coverage for generic 401 promotions, OAuth flow failures, and
post-auth retry paths.
@mavam mavam force-pushed the topic/fix-oauth branch from a552a59 to 2643b63 Compare March 10, 2026 07:34
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