Skip to content

Surface MCP OAuth re-authentication notices with inline Sign in for Codex and Claude Code #8335

Backlog

Description

@smsunarto

1. Summary

When an OAuth-protected MCP server configured for Codex or Claude Code requires authentication or re-authentication, bb silently drops the provider's notice. Users receive no prompt in the thread timeline and must discover the failure manually and run codex mcp login <name> (or re-authenticate via the CLI) by hand. On remote hosts this is even harder to work around, because the provider's local OAuth loopback listener runs on a machine the user's browser cannot reach directly.

2. Versions and environment

  • bb: built from source on main at b0ddaad731565d7e4de68d824120d802fc78f7d5
  • OS: Linux 7.2.15-1-omarchy
  • Node: v24.22.2
  • Providers: bb-plugin-provider-codex, bb-plugin-provider-claude-code

3. Steps to reproduce

  1. Check out b0ddaad731565d7e4de68d824120d802fc78f7d5 (or inspect the committed codex/steer-race recording directly):
BASE=b0ddaad731565d7e4de68d824120d802fc78f7d5
git show "$BASE:packages/provider-bridge-protocol/recordings/scenarios/codex/steer-race/provider→bridge.ndjson" \
  | grep '"mcpServer/startupStatus/updated"' \
  | grep '"reauthenticationRequired"'

git show "$BASE:packages/provider-bridge-protocol/recordings/scenarios/codex/steer-race/bridge→runtime.ndjson" \
  | grep -E 'provider\.warning|mcpSignIn|linear'
  1. Observe that the provider sends mcpServer/startupStatus/updated with status: "failed" and failureReason: "reauthenticationRequired" for linear right after turn/started, while the bridge emits no delta for linear at all.
  2. For Claude Code, start a thread when a non-claudeai MCP server reports status: "needs-auth" in system/init / mcpServerStatus() — the bridge never inspects mcp_servers or mcpServerStatus() for needs-auth, so no warning or sign-in affordance is emitted.

4. Expected vs actual

Actual (provider→bridge.ndjson lines 17 and 21 at b0ddaad731565d7e4de68d824120d802fc78f7d5):

{"ts":1794633124451,"run":1794633123689,"seq":44,"dir":"provider→bridge","line":"{\"method\":\"mcpServer/startupStatus/updated\",\"params\":{\"threadId\":\"01a1d878-4985-7163-bc18-56d64658f4b8\",\"name\":\"linear\",\"status\":\"failed\",\"error\":\"The linear MCP server requires OAuth reauthentication. Run `codex mcp login linear`.\",\"failureReason\":\"reauthenticationRequired\"},\"emittedAtMs\":1794633124451}"}
{"ts":1794633124616,"run":1794633123689,"seq":49,"dir":"provider→bridge","line":"{\"method\":\"mcpServer/startupStatus/updated\",\"params\":{\"threadId\":\"01a1d878-4985-7163-bc18-56d64658f4b8\",\"name\":\"linear\",\"status\":\"failed\",\"error\":\"The linear MCP server requires OAuth reauthentication. Run `codex mcp login linear`.\",\"failureReason\":\"reauthenticationRequired\"},\"emittedAtMs\":1794633124616}"}

Actual (bridge→runtime.ndjson matching provider.warning|mcpSignIn|linear):

{"ts":1794633124299,"run":1794633123689,"seq":21,"dir":"bridge→runtime","line":"{\"jsonrpc\":\"2.0\",\"method\":\"thread/delta\",\"params\":{\"threadId\":\"thr_3c8130a6cc\",\"deltas\":[{\"kind\":\"session.reset\"},{\"kind\":\"provider.warning\",\"category\":\"config\",\"summary\":\"`[features].multi_agent` is deprecated. It still controls the V1 fallback. `[agents].enabled = false` disables subagent tools even when the model selects a subagent version, unless `[features].multi_agent_v2` is enabled.\"}]}}"}
{"ts":1794633124300,"run":1794633123689,"seq":32,"dir":"bridge→runtime","line":"{\"jsonrpc\":\"2.0\",\"method\":\"thread/delta\",\"params\":{\"threadId\":\"thr_3c8130a6cc\",\"deltas\":[{\"kind\":\"provider.warning\",\"category\":\"general\",\"summary\":\"`[features].multi_agent` is deprecated. It still controls the V1 fallback. `[agents].enabled = false` disables subagent tools even when the model selects a subagent version, unless `[features].multi_agent_v2` is enabled.\"}]}}"}

Zero warnings or sign-in notices are emitted for linear.

Expected:

  • When a Codex or Claude Code MCP server requires OAuth (re)authentication, bb surfaces a visible inline notice in the thread timeline (kept outside collapsed turns) with a Sign in action, while non-auth startup failures (e.g., computer-use at line 23 of the same recording) stay suppressed.
  • Clicking Sign in (or invoking the equivalent CLI/SDK surface) starts the provider's OAuth flow and provides a browser link plus a paste-the-redirect-URL path so sign-in works on both local and remote hosts without exposing SSRF to non-loopback addresses.
  • Completing sign-in persists the signed-in state in the thread timeline across reloads and turn expansion.

5. Evidence

6. What you ruled out

AGENT GENERATED

Activity

  1. added theissue type on Nov 29, 2026
  2. added
    providers
    threads
    provider-codex
    provider-claude-code
    partial-repro
    on Nov 29, 2026
  3. bb-slop-cop commented on Nov 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Applied Bug, Priority: Medium, Effort: High, and labels providers, threads, provider-codex, provider-claude-code.
    • Reproduction and root-cause report: PARTIALLY REPRODUCED, high root-cause confidence; reproduction label: partial-repro.
    • Root cause: Codex startup status and Claude initialization are suppressed as noise before extracting MCP authentication requirements.
    • Reproduction: both production translators return no deltas for authentication-required inputs in two clean trusted-main checkouts. Each run has two intended failing assertions and three passing controls. Live OAuth, remote callbacks, timeline rendering, and persistence remain unverified.
    • No new PR: linked open PR #8336 already addresses this issue; no linked-PR code was executed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partial-reproprovider-claude-codeprovider-codexprovidersthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions