anthropics / anthropics/claude-code

OAuth sign-in wait screen has no cancel: Esc, Ctrl-C ×2, q, Ctrl-D, Ctrl-Z all leave it unchanged; Enter loops through the error screen

Offen
#89,261 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:auth area:tui bug platform:linux
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

**Environment:** Claude Code v2.1.219, Linux, running under tmux in a 40×29 pty (a phone-sized terminal), fresh `CLAUDE_CONFIG_DIR`.

## What happens

During `/login` → OAuth, once the flow reaches the wait screen —

```
Browser didn't open? Use the (c to
url below to sign in copy)

https://claude.com/cai/oauth/authorize?…

Paste code here if prompted >
```

— **no keystroke leaves it.** Measured one key at a time against the live process (screen captured after each input; the pane command instrumented so an exit could not be missed):

| input on the wait screen | result |
|---|---|
| Escape | screen unchanged |
| Ctrl-C ×1 | unchanged |
| Ctrl-C ×2 (Claude Code's own "press again to exit" convention) | unchanged |
| `q` | types into the code field |
| Ctrl-D | unchanged |
| Ctrl-Z | unchanged |
| Enter (empty code) | → "OAuth error: Invalid code … Press Enter to retry." |
| Enter again (retry) | → back to the same wait screen — a closed loop |
| Escape after the retry | unchanged |

`[claude exited]` never printed. The wait screen and its error sibling form a closed loop whose only exits are completing the login or killing the process.

## Why it matters

The login **picker** honors `Esc to cancel`, so a user who chose the wrong login method (or whose browser handoff failed — common when Claude Code runs on a remote host and the browser cannot open) reasonably expects Escape to work one screen later. It doesn't, and nothing on the screen says so. On a remote/mobile terminal this is a dead end: you either finish a sign-in you may not want, or kill the process.

## Ask

Escape (or Ctrl-C) on the OAuth wait screen should cancel back to the login method picker — matching the escape hatch the picker itself already advertises. Failing that, the screen should say what actually exits it.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start at the /login OAuth flow, comparing the login method picker with the OAuth wait and error screens described in the issue. Trace how Escape and Ctrl-C are handled on each screen, then verify that cancellation returns to the picker and that retry behavior still works without trapping the user in the wait-screen loop.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
linux, python
Bereich
authentication, cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.