Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Subagent execution limit discards work and returns no result

Open kunitaya opened this issue 2 months ago • 4 comments

Environment

  • Operating System: linux (WSL2, Ubuntu 24.04.4)
  • Kiro Version: 1.1.14 (f694ef1b025756b1ae27ae7c3d9ed4215b0160fe, x64)
  • Mode: Spec "Run all required tasks", delegating each task to the spec-task-execution subagent through invoke_sub_agent

Related, but not the same report: #11157 covers a Kiro CLI subagent DAG stage stalling until the idle deadline; #8533 covers a missing summary. This report is about the IDE's invoke_sub_agent execution limit, the absence of any partial result on abort, and the orchestrator's lack of validation scope.

Summary

Delegated subagent work is lost or invisible when a subagent hits its execution limit, and the orchestrator has no notion of validation scope. In one session this cost roughly four hours of wall-clock time and produced no usable result for a single task.

Observations

  1. An aborted subagent returns neither its result nor a reason. A subagent was aborted at the one-hour limit. Roughly 2,500 lines of implementation and tests survived only because they happened to be left in the working tree; the parent received no summary, no partial result, and no indication of what had been completed.
  2. Retries consumed the full hour with zero progress. A second invocation on the same task produced only a throwaway debug script: no source change, no commit. A later invocation for a single gh issue create call also consumed the full hour and created nothing.
  3. Some invocations return no output and change no files. The parent had to infer state from git status to decide whether anything had happened.
  4. The parent cannot see the remaining execution budget. There is no way to know how much time a delegated slice has left, so a parent cannot decide whether a long verification step fits inside the invocation.
  5. The orchestrator prompt has no notion of validation scope and does not defer to workspace steering. The workspace's own steering rules explicitly forbid running the full regression suite for every child task and reserve it for a final validation checkpoint. Nothing in the Run All Tasks orchestrator instructions surfaces that, so the parent wrote a full-suite command into each child prompt. On this project the full suite takes about 30 minutes (measured: 1760.69s and 1843.64s), which by itself consumed the child invocations' budgets.

Impact

For one task, three of four subagent invocations produced zero progress. Credits and wall-clock time are spent with no artifact, no diagnostic, and no way for the parent to plan around the limit.

Expected behavior

  • On abort, return the partial result and the reason, including which files the subagent had modified.
  • Expose the remaining execution budget to the invoking agent.
  • Allow the timeout to be set per invocation, or checkpoint long-running delegated work.
  • Have the orchestrator's own instructions respect the workspace's steering rules about validation scope, so expensive suites are not requested per child task.

No project code, repository names, credentials, environment variables, or private logs are included in this report.

kunitaya avatar Sep 16 '26 02:09 kunitaya

🤖 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 problems with subagent execution limits/timeouts consuming the full budget with no useful output. Issue #11157 covers a DAG stage stalling until the 3600-second idle deadline, while the new issue covers invoke_sub_agent hitting its execution limit and discarding work. They share the core problem of subagent invocations consuming their full time budget and returning no result, though the new issue is broader in scope (also covering missing partial results, no budget visibility, and orchestrator validation scope).

github-actions[bot] avatar Sep 16 '26 02:09 github-actions[bot]

Not a duplicate, though related.

#11157 is the Kiro CLI subagent DAG stalling until the idle deadline; this report is the IDE's invoke_sub_agent at version 1.1.14. #10999 is about total credit/time spend in autonomous mode. Neither covers the specific, actionable gaps here:

  1. an aborted subagent returns no partial result and no list of files it changed;
  2. the parent has no visibility into the remaining execution budget;
  3. the timeout is not settable per invocation; and
  4. the Run All Tasks orchestrator does not defer to workspace steering about validation scope, so a parent writes an expensive full-suite command into each child prompt.

Keeping this open for those four items.

kunitaya avatar Sep 16 '26 02:09 kunitaya

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 Sep 16 '26 02:09 github-actions[bot]

Thanks for the detailed account. Multiple distinct gaps are described: an aborted subagent returning no partial result or file list, no visibility into remaining execution budget, and the orchestrator prompt not honoring workspace steering rules about validation scope. The partial-result gap is the most immediately impactful. Marking this as a bug to investigate further. We're tracking this for a fix.

AnilMaktala avatar Sep 16 '26 16:09 AnilMaktala