Repository navigation
Restart Claude sessions after authentication failures - #2098
Merged
ymichael merged 2 commits intoAug 20, 2026
Merged
Conversation
ymichael
force-pushed
the
bb/fix-provider-authentication-error-thr_2ew3f4ewjp
branch
from
August 20, 2026 23:22
92dd249 to
9d331b8
Compare
ymichael
deleted the
bb/fix-provider-authentication-error-thr_2ew3f4ewjp
branch
August 20, 2026 23:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was wrong
Claude Code can emit terminal
authentication_failedoroauth_org_not_allowedassistant errors without ending its SDK stream. The Claude bridge treated any still-open stream as writable, so after terminal reauthentication the next turn in the affected bb thread was sent to the old CLI child with stale credentials instead of starting a process that could see the refreshed authentication. This is the root cause reproduced in #2097 and the reported bb thread.What changed
This is internal to the Claude provider bridge. There are no host-daemon wire, public plugin API, CLI, configuration, or documentation changes, so
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
The new regression test fails before the fix because the bridge retains one query, never closes it, and does not create a resumed replacement for the next turn. It passes after the change and verifies that the failed turn remains, the stale query closes exactly once, a second query is launched with the same
resumeID, and the next prompt reaches it.pnpm exec turbo run test --filter=bb-plugin-provider-claude-code --force— 18 files and 263 tests passed.pnpm exec turbo run typecheck --filter=bb-plugin-provider-claude-code— 5 Turbo tasks passed.pnpm exec turbo run test --filter=@bb/agent-runtime --force— 31 files and 422 tests passed.pnpm exec turbo run typecheck --filter=@bb/agent-runtime— 4 Turbo tasks passed.git diff --check origin/main...HEADFixes #2097