claude-code - 💡(How to fix) Fix /mcp dialog unresponsive after completing OAuth authentication in browser — unable to press Enter to continue [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47937Fetched 2026-04-15 06:38:05
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×1cross-referenced ×1subscribed ×1

After initiating an OAuth flow (e.g., Slack) via the /mcp dialog, completing authentication in the browser, and returning to the CLI, the dialog becomes unresponsive. Pressing Enter has no effect, making it impossible to proceed.

Root Cause

After initiating an OAuth flow (e.g., Slack) via the /mcp dialog, completing authentication in the browser, and returning to the CLI, the dialog becomes unresponsive. Pressing Enter has no effect, making it impossible to proceed.

RAW_BUFFERClick to expand / collapse

Description

After initiating an OAuth flow (e.g., Slack) via the /mcp dialog, completing authentication in the browser, and returning to the CLI, the dialog becomes unresponsive. Pressing Enter has no effect, making it impossible to proceed.

Steps to reproduce

  1. Run /mcp in Claude Code CLI
  2. Select a connector that uses OAuth (e.g., "claude.ai Slack")
  3. Browser opens — complete the OAuth authentication successfully
  4. Return to the CLI terminal

Expected behavior

The dialog should detect the completed OAuth and allow the user to press Enter to continue, returning to the normal prompt.

Actual behavior

The dialog is stuck. Enter key does nothing. Pressing Escape navigates back to the "authenticate" menu instead of dismissing the dialog. The only way to exit is Ctrl+C or restarting Claude Code.

Environment

  • OS: Ubuntu 22.04.5 LTS
  • Kernel: 6.8.0-107-generic
  • Claude Code version: 2.1.107

extent analysis

TL;DR

The issue may be resolved by modifying the OAuth callback handling in the Claude Code CLI to properly detect and respond to the completion of the authentication flow.

Guidance

  • Investigate the OAuth callback URL and its handling in the Claude Code CLI to ensure it correctly detects the authentication completion and updates the dialog state.
  • Verify that the /mcp dialog is properly configured to listen for the OAuth completion event and update its state accordingly.
  • Check the Claude Code CLI's event handling mechanism to ensure it correctly processes the Enter key press after the OAuth flow is completed.
  • Review the dialog's navigation logic to ensure that pressing Escape correctly dismisses the dialog instead of navigating back to the "authenticate" menu.

Example

No code snippet can be provided without more information about the Claude Code CLI's internal implementation.

Notes

The provided information suggests an issue with the OAuth callback handling or the dialog's event handling mechanism. However, without more details about the Claude Code CLI's internal implementation, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by modifying the OAuth callback handling or the dialog's event handling mechanism to correctly detect and respond to the completion of the authentication flow, as this seems to be the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The dialog should detect the completed OAuth and allow the user to press Enter to continue, returning to the normal prompt.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING