Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

IDE | Supervised mode deadlock: session freezes after accepting file changes when run_command approval is queued simultaneously

Open aferrari94 opened this issue 5 months ago • 5 comments

Before opening, please confirm:

Operating System

macOS 26.5.1 (Darwin arm64 25.5.0)

Kiro Version

1.0.0

Bug Description

In Supervised mode, the session freezes permanently after accepting file write changes. All buttons become disabled and the only recovery is to cancel the session.

Actual Behavior

The session enters a deadlock state. The UI shows no pending approval, but the agent backend is waiting for a run_command permission response that is never presented to the user.

Log Evidence

From ~/.kiro/logs/:

11:32:44.568Z — [ACPEventAdapter] Execution yielded (file write review) 11:32:44.611Z — acp.policy-eval.complete {"toolId":"run_command","effect":"ask"} 11:32:44.647Z — [ACP ToolApproval] Requesting permission for toolId=run_command

After this, no further activity until manual cancellation ~80 minutes later. The run_command approval request was never surfaced in the UI.

Image

Steps to Reproduce

  1. Use Kiro in Supervised mode
  2. Ask the agent to perform a task that involves both file writes and a terminal command in sequence (e.g., editing a file and then running a build/lint command)
  3. The agent produces file changes → the "Review changes" yield panel appears
  4. Accept all changes ("Accept remaining")
  5. The session freezes — no further progress, all UI buttons disabled

Expected Behavior

After accepting the file changes, the session should continue and show the next approval prompt (for the run_command).

Conversation ID

sess_aeb1894f

Additional Context

Root Cause (hypothesis)

Race condition between the execution yield (for file change review) and a simultaneous tool approval request (run_command). The yield takes over the UI, the run_command approval gets queued but never displayed after the yield is resolved.

aferrari94 avatar Jun 22 '26 13:06 aferrari94

🤖 Potential Duplicate Detected

This issue appears to be similar to:

What happens next?

  • ⏰ This issue will be automatically closed in 3 days
  • 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
  • 💬 Comment on the original issue if you have additional information

Why is this marked as duplicate? Both report UI freezing/getting stuck in supervised mode when modifications require approval, with similar symptoms of disabled buttons and session requiring cancellation to recover

github-actions[bot] avatar Jun 22 '26 13:06 github-actions[bot]

They could be related, but I cannot be sure about that.

What can I say for sure is that it is pretty annoying:

  • Every time I have to restart session hoping it is not going to stuck again
  • Each incomplete request consume token/money

aferrari94 avatar Jun 22 '26 13:06 aferrari94

Thank you for your feedback! 🙏

The duplicate label has been removed and this issue has been sent back for maintainer review.

A maintainer will review this issue shortly.

github-actions[bot] avatar Jun 22 '26 13:06 github-actions[bot]

Thank you for the detailed report and log capture, @aferrari94. We believe #9652 and this issue share the same root cause, surfaced on different code paths (a first-call str_replace in #9652, a queued run_command after a successful file-write approval here). We will keep this issue open as the diagnostic-rich tracker and consolidate as appropriate.

Marking as a bug for the team to investigate further.

AnilMaktala avatar Jun 22 '26 18:06 AnilMaktala

This issue has been fixed in v2.11.1 (released July 20, 2026).

Fix: Turn approvals in supervised mode now persist across session reopen.

Changelog entry: 20260720-1724-fixed

Please upgrade to the latest version. If you're still experiencing deadlocks after upgrading, please open a new issue with your version and reproduction steps.

AnilMaktala avatar Oct 29 '26 18:10 AnilMaktala