Skip to content

fix: keep parent active for async subagents - #157

Merged
graykode merged 1 commit into
graykode:mainfrom
kouyichi:fix/async-subagent-status
Jul 27, 2026
Merged

fix: keep parent active for async subagents#157
graykode merged 1 commit into
graykode:mainfrom
kouyichi:fix/async-subagent-status

Conversation

@kouyichi

Copy link
Copy Markdown
Contributor

Summary

  • collect Claude subagents before calculating the parent session status
  • keep the parent session Executing while any async subagent is still working
  • add a regression test covering an immediate async Agent tool result followed by a text-only parent response

Problem

Async Claude Agent calls return a tool_result immediately even though the subagent continues in the background. Once the parent writes a text-only response, current_task is cleared and abtop falls through to Waiting, despite already discovering a working subagent for the session.

Test plan

  • cargo clippy -- -D warnings
  • cargo test
  • cargo build --release

Closes #156

@graykode graykode left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the status transition, subagent activity heuristic, filesystem behavior, and regression coverage. The change is focused, preserves the existing collection path, and correctly keeps the parent session Executing while an asynchronous subagent remains active. The full test suite, clippy, and release build pass locally. Approved.

@graykode
graykode merged commit 148f64d into graykode:main Jul 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude parent shows Waiting while async subagents are still working

2 participants