feat(cli): surface resumable task_id when a subagent stops on error#11621
Conversation
Foreground and background subagent failures now include the child session's task_id and a hint that it can be resumed via the task tool, so a stopped subagent can be continued instead of being lost (Kilo-Org#11620).
Head branch was pushed to by a user without write access
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit 0274b72)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 0274b72)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (2 files)
Previous review (commit 2ac38d7)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (3 files)
Reviewed by gpt-5.4-20260305 · Input: 56.3K · Output: 6.4K · Cached: 225.3K Review guidance: REVIEW.md from base branch |
|
@maoxin1234 looks good. We can do this until we have all of the different issues fixed. (Related: #11585) |
|
@maoxin1234 both bot comments seem valid. We should fix them. |
|
Fixed both in 0274b72:
Both new tests pass, typecheck and the annotation check are green. |
|
Thanks @maoxin1234 , appreciate the contribution! |
…able-error-output feat(cli): surface resumable task_id when a subagent stops on error
Problem
Closes #11620 (partially — backend slice).
When a subagent stops on an error (provider error, rate limit, timeout), the parent agent never sees the child session's
task_idin a resumable form. The task tool already supports resuming a subagent by passing a priortask_id(it continues the same child session instead of creating a fresh one), but on the failure path that id is dropped, so a stopped subagent effectively becomes one-shot and its context is lost.Change
Surface the resumable
task_idwhenever a subagent stops on an error, on both paths:task_idand a hint that the session can be resumed.task_errormessage injected back into the parent session now includes the same resumable hint.No new resume machinery is introduced — this only makes the already existing
task_idresume capability discoverable to the parent agent on the error path.Testing
bun test test/tool/task.test.ts→ 23 pass / 0 failtask_id="<id>"and the resume hinttask_errormessage surfaces the resumabletask_idtsgo --noEmiton@kilocode/cli→ 0 errorsoxlinton the changed files → 0 errorsChangeset included.
Out of scope / follow-up
The issue also asks for UI affordances (a "Continue" button on stopped subagents,
@subagentmentions). Those belong in the TUI subagent footer (subagent-data.ts) and are best done as a separate PR on top of this backend slice.