Repository navigation
Conversation
smsunarto
force-pushed
the
scott/bb-19-mcp-oauth-reauth-prompt-with-inline-sign-i-thr_tsdzd2zehf
branch
from
November 29, 2026 06:11
cf0f22c to
9bc6112
Compare
This branch has not been deployed
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.
Human comments
What was wrong
When a Codex or Claude Code MCP server required OAuth authentication or re-authentication, bb dropped the provider's signal (#8335). In
plugins/provider-codex/src/visibility.ts,mcpServer/startupStatus/updatedwas classified as"noise"and ignored by delta translation, andplugins/provider-claude-code/src/bridge/bridge.tsnever inspectedmcp_serversormcpServerStatus()forneeds-authservers. Users received no prompt in the thread timeline and had to runcodex mcp login <name>manually—which fails on remote hosts where the provider's local loopback OAuth listener runs on a machine the user's browser cannot reach directly.What changed
reauthenticationRequired/mcp loginon Codex; non-claudeaineeds-authon Claude Code) as inline warning rows kept outside collapsed turns, while keeping non-auth startup failures suppressed.provider/mcpSignIn/completedthread event (also emitted when Codex reportsreadyor Claude reportsconnectedafter an announced notice), derived per thread and server across latest pages, older pages, reloads, and turn-summary details.HOST_DAEMON_PROTOCOL_VERSIONfrom285to286, addingthread.mcp_sign_in.startandthread.mcp_sign_in.completehost daemon commands andthread/mcpSignIn/start/thread/mcpSignIn/completeprovider bridge JSON-RPC methods.experimental_validateLoopbackOAuthCallbackUrlfrom@get-bb/plugin-sdk/provider-bridge(http/https only, with protocol, host, port, pathname, and state bound and loopback-only verification via@bb/config/loopback), documented indocs/api_to_audit.mdandplugins/plugin-api-docs/src/surfaces.ts.@bb/sdk:POST /api/v1/threads/:id/mcp-sign-in/startandPOST /api/v1/threads/:id/mcp-sign-in/complete.bb thread mcp-sign-in [id] --server <name> [--callback-url-file <path> | --callback-url <url>], supporting-to read piped stdin or paste interactively at a terminal (raw-modereadlineto avoid canonical-mode truncation and keep OAuth codes out of shell history).loginIdmatching onmcpServer/oauthLogin/completed(upstream notification schema does not carryloginId).fa02e0d78135e4b06892ac35f62213f0e592aac7(MIT).How you verified
pnpm exec turbo run build:types --filter=@get-bb/plugin-sdkand fulllint,typecheck, andtestsuites across all 20 touched packages (@bb/app706 files / 7,487 tests,@bb/server439 files / 4,595 tests,@bb/cli82 files / 1,460 tests,@bb/db72 files / 762 tests,@bb/thread-view36 files / 567 tests,@bb/agent-runtime23 files / 320 tests,@bb/provider-bridge-protocol26 files / 430 tests,@get-bb/plugin-sdk44 files / 453 tests,bb-plugin-provider-codex51 files / 641 tests,bb-plugin-provider-claude-code33 files / 467 tests,bb-plugin-plugin-api-docs13 files / 76 tests, plus@bb/domain,@bb/host-daemon-contract,@bb/server-contract,@bb/sdk,@bb/client-core,@bb/templates,@bb/provider-bridge-acp,bb-plugin-provider-pi, and@bb/host-daemon).pnpm start:worktreedev instance driven byfake-codex-app-server.mjsand a fake loopback OAuth server (127.0.0.1): mid-turn notice stays outside collapsed turns, rejection offers Try again, completion persists Signed in across reload and turn expansion, andbb thread mcp-sign-in --callback-url-file -works end-to-end. Testing used fake OAuth servers only, never real accounts.pty.openpty()).Closes #8335