MoonshotAI / MoonshotAI/kimi-cli
Bug: /login OAuth wait cannot be cancelled with Esc
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
Summary
When users run /login in the shell UI and choose Kimi Code, the device authorization flow enters a Waiting for user authorization... state that cannot be cancelled with Esc.
Steps to reproduce
- Start the shell UI.
- Run
/login. - Select
Kimi Code. - Wait until the CLI shows
Waiting for user authorization.... - Press
Esc.
Actual behavior
The shell stays stuck in the waiting state and does not return to the prompt.
Expected behavior
Esc (and other user interrupt paths such as Ctrl+C) should cancel the OAuth wait loop and return control to the shell prompt.
Root cause
The OAuth device polling loop does not expose a cancel signal, and the shell-level /login flow does not attach the waiting state to the existing interactive cancel handling used by running prompts.
Impact
Users can get trapped in the login flow if they decide not to finish browser authorization immediately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the shell UI's /login flow and the OAuth device polling loop, then compare them with the existing interactive cancel handling used by running prompts. Done means Esc and Ctrl+C interrupt the authorization wait and return the user to the shell prompt; verify the behavior through the login flow's tests or a shell UI reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100