Skip to content

feat(providers): offer reconnect for auth-class inference failures - #1298

Merged
TheGreatAxios merged 2 commits into
mainfrom
feat/reconnect-1295
Oct 2, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
feat/reconnect-1295

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • OAuth 426 upgrade rejections on known-OAuth providers reclassify to credential failure and name the exact one-action command in the transcript
  • Failing turns surface an idle-only reconnect offer that opens /connect pre-scoped to the failing kind and profile, with replay-once only when nothing is committed
  • Reconnect wins over the provider-switch picker when both arm, with no cascade on dismiss

Verification

  • bun run check passes (lint, typecheck, dead-exports, build, guarded suite: 8078 pass, 0 fail)
  • New tests: reconnect-recovery, submit precedence, classifier fixtures, pre-scoped connect

Fixes #1295

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review · Request changes

The branch classifies reconnectable auth failures and adds a scoped reconnect/replay flow.

Findings

  • src/tui/runner/reconnect-recovery.ts:209 — Accepting the reconnect offer replays the failed turn before reconnection succeeds. openReconnect only opens the interactive add-provider surface (lines 264–270), but applyReconnectRecoverySelection immediately arms and delivers the continuation at lines 210–214; the director consumes that message by starting inference, while the operator has not yet completed OAuth. This can repeat the same credential failure behind the open reconnect UI and consumes the one replay. Please trigger the continuation from the successful connect completion callback instead.

bun run check passes on this head (8,031 tests, 0 failures), and git diff --check 1ba2599...057c290b passes.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review follow-up · Fix verified

No findings in fix commit 4ddcf4ec.

Opening the scoped reconnect surface no longer delivers a continuation. The one-shot completion callback delivers replay only after a successful connection, while cancellation, failure, committed attempts, and duplicate completion do not replay. Normal /connect remains callback-free.

Verification: all GitHub checks pass; git diff --check 057c290b..4ddcf4ec passes.

@TheGreatAxios
TheGreatAxios merged commit 4f89423 into main Oct 2, 2026
13 checks passed
@linear-code

linear-code Bot commented Oct 3, 2026

Copy link
Copy Markdown

CL-9792

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.

Inference failure: offer reconnect for auth/upgrade-class provider errors

1 participant