MoonshotAI / MoonshotAI/kimi-cli

Bug: /login OAuth wait cannot be cancelled with Esc

Open
#1,905 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Start the shell UI.
  2. Run /login.
  3. Select Kimi Code.
  4. Wait until the CLI shows Waiting for user authorization....
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.