Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

[Bug] Subagent terminal command completion event lost — causes indefinite hang during Run All Tasks

Open DGU-stallion opened this issue 5 months ago • 1 comments

Description

When "Run All Tasks" dispatches a subagent (spec-task-execution) that runs a terminal command (e.g. npx vitest run), the terminal command completes successfully but its completion signal is never propagated back to the subagent, causing the entire execution to hang indefinitely until manually aborted.

Environment

  • Kiro Version: 0.12.333
  • OS: macOS 26.5.1
  • Node: v24.16.0

Steps to Reproduce

  1. Create a spec with multiple tasks (5+ parent tasks, 20+ sub-tasks)
  2. Use "Run All Tasks" which dispatches subagents via invoke_sub_agent
  3. The subagent runs a terminal command (e.g., npx vitest run <file>)
  4. Observe: terminal output appears in the user's terminal but Kiro never advances

Expected Behavior

The terminal command completion should be detected and returned to the subagent, allowing execution to continue.

Actual Behavior

The subagent hangs indefinitely waiting for the terminal result. After ~5 minutes, user must manually abort.

Log Evidence

From `~/Libr

Environment

  • Kiro Version: 0.12.333
  • OS: macOS 26.5.1
  • Node: v24.16.0

Steps to Reproduce

  1. Create a spec with multiple tasks (5+ parent tasks, 20+ sub-tasks)
  2. Use "Run All Tasks" which dispatches subagents via invoke_sub_agent
  3. The subagent runs a terminal command (e.g.,:1

DGU-stallion avatar Jul 01 '26 03:07 DGU-stallion

🤖 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 issues report terminal commands hanging after successful completion in Kiro, where the agent never receives the completion signal. Issue #6717 specifically describes 'executeBash: Terminal hangs after successful command, agent receives Signal was cancelled' which matches the new issue's core symptom of terminal command completion not being propagated back to the subagent, causing indefinite hang.

github-actions[bot] avatar Jul 01 '26 03:07 github-actions[bot]