MoonshotAI / MoonshotAI/kimi-cli
[Bug] VS Code extension: approval prompts (ExitPlanMode / tool permissions) intermittently never render, causing indefinite stalls or a silent 600s timeout
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
Extension: moonshot-ai.kimi-code 0.6.4 (VS Code, darwin-arm64, macOS)
Which open platform/subscription were you using?
Allegretto
Which model were you using?
kimi-k3
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
[Bug] VS Code extension: approval prompts (ExitPlanMode / tool permissions) intermittently never render, causing indefinite stalls or a silent 600s timeout
Environment
- Extension:
moonshot-ai.kimi-code0.6.4 (VS Code, darwin-arm64, macOS) - Backend session: kimi-code, model
kimi-code/k3 - Permission mode at the time:
manual(default;default_permission_modewas unset)
Summary
When the agent makes a blocking approval request (tool permission or ExitPlanMode plan approval), the chat UI intermittently shows nothing at all — no inline card, no notification, no pending state. The user stares at an idle-looking conversation while the request hangs. Two observed failure modes:
- Tool permission (Bash), overnight hang: a Bash approval issued at 22:42 local stayed pending for 9 hours with no timeout, until the user's next message cancelled the whole turn (
Turn cancelled). ExitPlanModeplan approval, invisible + 600s silent timeout: the approval was issued at 20:41:55 local, nothing rendered on screen (user was watching the entire time), and exactly 600 seconds later the client auto-cancelled it ("decision": "cancelled", "feedback": "Turn cancelled"). Retrying the same approval 2 minutes later rendered correctly and was approved.
Because the approval UI never appears, the user has no way to proceed — the only exits are the hidden 600s timeout or manually interrupting the turn.
Steps to reproduce
- In the VS Code extension, let the agent enter plan mode and call
ExitPlanMode(or issue any tool-permission request inmanualmode). - Intermittently: no approval UI appears in the chat panel.
- Wait — nothing happens. After exactly 600s the approval is cancelled with
Turn cancelled; or it hangs indefinitely (observed: 9 hours).
Expected behavior
- The chat should always show a visible "waiting for approval" state, even if the approval card fails to render (text fallback).
- Approval waits should have a reasonable, user-visible timeout — not a silent 600s cancel, and not an unbounded overnight hang.
- Per the docs, in
autopermission modeExitPlanModeshould exit without prompting; please confirm this path works in the extension.
Logs (from ~/.kimi-code/sessions/<session>/agents/main/wire.jsonl, local time +0800)
Incident A — Bash approval hung overnight (issued 2026-07-26 22:42, cancelled next morning):
// LLM activity stops at 2026-07-26T14:42:49Z (22:42 local); nothing until the user's message 9h later
{"type":"permission.record_approval_result","time":"2026-07-27 07:46:08","toolName":"Bash",
"action":"Running: ls app/routers/ && grep -rn \"include_router\\|APIRouter\" app/main.py | head -20",
"result":{"decision":"cancelled","feedback":"Turn cancelled"}}
### What steps can reproduce the bug?
## [Bug] VS Code extension: approval prompts (ExitPlanMode / tool permissions) intermittently never render, causing indefinite stalls or a silent 600s timeout
### Environment
- Extension: `moonshot-ai.kimi-code` **0.6.4** (VS Code, darwin-arm64, macOS)
- Backend session: kimi-code, model `kimi-code/k3`
- Permission mode at the time: `manual` (default; `default_permission_mode` was unset)
### Summary
When the agent makes a blocking approval request (tool permission or `ExitPlanMode` plan approval), the chat UI **intermittently shows nothing at all** — no inline card, no notification, no pending state. The user stares at an idle-looking conversation while the request hangs. Two observed failure modes:
1. **Tool permission (Bash), overnight hang**: a Bash approval issued at 22:42 local stayed pending for **9 hours** with no timeout, until the user's next message cancelled the whole turn (`Turn cancelled`).
2. **`ExitPlanMode` plan approval, invisible + 600s silent timeout**: the approval was issued at 20:41:55 local, **nothing rendered on screen** (user was watching the entire time), and exactly **600 seconds** later the client auto-cancelled it (`"decision": "cancelled", "feedback": "Turn cancelled"`). Retrying the same approval 2 minutes later rendered correctly and was approved.
Because the approval UI never appears, the user has no way to proceed — the only exits are the hidden 600s timeout or manually interrupting the turn.
### Steps to reproduce
1. In the VS Code extension, let the agent enter plan mode and call `ExitPlanMode` (or issue any tool-permission request in `manual` mode).
2. Intermittently: no approval UI appears in the chat panel.
3. Wait — nothing happens. After exactly 600s the approval is cancelled with `Turn cancelled`; or it hangs indefinitely (observed: 9 hours).
### Expected behavior
- The chat should always show a visible "waiting for approval" state, even if the approval card fails to render (text fallback).
- Approval waits should have a reasonable, user-visible timeout — not a silent 600s cancel, and not an unbounded overnight hang.
- Per the docs, in `auto` permission mode `ExitPlanMode` should exit without prompting; please confirm this path works in the extension.
### Logs (from `~/.kimi-code/sessions/<session>/agents/main/wire.jsonl`, local time +0800)
**Incident A — Bash approval hung overnight (issued 2026-07-26 22:42, cancelled next morning):**
```json
// LLM activity stops at 2026-07-26T14:42:49Z (22:42 local); nothing until the user's message 9h later
{"type":"permission.record_approval_result","time":"2026-07-27 07:46:08","toolName":"Bash",
"action":"Running: ls app/routers/ && grep -rn \"include_router\\|APIRouter\" app/main.py | head -20",
"result":{"decision":"cancelled","feedback":"Turn cancelled"}}
### What is the expected behavior?
do NOT stop working any more
### Additional information
{"type":"plan_mode.enter","time":"2026-07-27 20:40:55"}
// 20:41:55 ExitPlanMode approval requested — nothing rendered on screen
{"type":"permission.record_approval_result","time":"2026-07-27 20:51:55","toolName":"ExitPlanMode",
"action":"Presenting plan and exiting plan mode",
"result":{"decision":"cancelled","feedback":"Turn cancelled"}} // exactly 600s after request
// Retry of the same approval rendered correctly and was approved:
{"type":"permission.record_approval_result","time":"2026-07-27 20:53:52","toolName":"ExitPlanMode",
"action":"Presenting plan and exiting plan mode","result":{"decision":"approved"}}
{"type":"plan_mode.exit","time":"2026-07-27 20:53:52"}
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 by reproducing a manual-mode approval in the VS Code extension and inspect the session log at ~/.kimi-code/sessions//agents/main/wire.jsonl, especially permission.record_approval_result and plan_mode events. Trace why the approval request can lack visible UI and why waits differ between an overnight hang and the observed 600-second cancellation. Done means every approval has a visible fallback and user-visible bounded behavior, with the auto-mode ExitPlanMode path confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, vscode
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100