claude-code - 💡(How to fix) Fix "[BUG] OAuth code input prompt silently drops paste - code not accepted in Replit shell" [10 comments, 11 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#47798Fetched 2026-04-15 06:42:02
View on GitHub
Comments
10
Participants
11
Timeline
18
Reactions
2
Author
Timeline (top)
commented ×10labeled ×4marked_as_duplicate ×1mentioned ×1

Error Message

OAuth error: Invalid code. Please make sure the full code was copied

Code Example

OAuth error: Invalid code. Please make sure the full code was 
 copied
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

OAuth code input prompt is not accepting paste in Replit shell — paste works fine in the shell itself but nothing appears when pasting into Claude Code's auth prompt. Worked fine previously, broke today.

What Should Happen?

Pasting the OAuth code into the input prompt should work the same way it does in the shell itself — the code should appear (even if partially masked) and be accepted when Enter is pressed. Previously this worked correctly every day for over a year. As of today it has stopped working entirely — nothing appears when pasting, and the code is rejected.

Error Messages/Logs

OAuth error: Invalid code. Please make sure the full code was 
 copied

Steps to Reproduce

1. Open Replit shell 2. Type claude to start Claude Code 3. Follow the login flow and select the OAuth/browser option 4. Copy the URL shown in the terminal, paste into local browser 5. Authenticate in browser and copy the resulting OAuth code 6. Return to Replit shell where Claude Code is waiting for the code 7. Attempt to paste the code into the input prompt 8. Nothing appears — paste is silently swallowed by Claude Code's input prompt 9. Pressing Enter returns "OAuth error: Invalid code" Note: pasting works fine in the Replit shell itself (confirmed with echo test). The issue is specific to Claude Code's auth input prompt.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.107 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by checking the input prompt's configuration or handling in Claude Code, specifically how it interacts with pasted input.

Guidance

  • Review the Claude Code's input prompt implementation to ensure it correctly handles pasted input, possibly focusing on event listeners or input validation.
  • Verify if there are any recent changes in the Replit shell or Claude Code's OAuth flow that could be interfering with the paste functionality.
  • Test the input prompt with different types of input (e.g., typed vs. pasted) to isolate the issue.
  • Consider checking for any updates or patches for Claude Code or Replit shell that might address this regression.

Example

No specific code example can be provided without more details on the implementation, but reviewing the input handling code for any changes or potential issues is a good starting point.

Notes

The issue seems to be specific to the interaction between Claude Code's input prompt and the Replit shell, and without more information on the implementation details, it's challenging to provide a precise fix. The fact that pasting works in the Replit shell itself but not in Claude Code's prompt suggests the issue lies in how Claude Code handles input.

Recommendation

Apply workaround: Given the information, a workaround might involve manually typing the OAuth code into the prompt until the issue is resolved, though this is not ideal due to the code's length and potential security concerns.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix "[BUG] OAuth code input prompt silently drops paste - code not accepted in Replit shell" [10 comments, 11 participants]