Repository navigation
Conversation
Some subagents (the web-fetch helper, for one) fire no SubagentStart or SubagentStop, so their helper stayed at the lead's desk for the rest of the session. The adapter now reads a SubagentHandback that went through as worker.stop. Adds a fixture distilled from a real session.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by T · project thread
What was wrong
Some subagents fire no
SubagentStartand noSubagentStophook at all. A recorded session from 2026-11-21 has aweb-fetchsubagent like that: its tool calls carry itsaid, so a helper walks in on its first call, but nothing ever said it was done, so the helper stood at its lead's desk until the whole session left. Replaying that bus through the director onmainshowed the helper still there 10+ minutes after it finished. Core is the same inagentopiahq@0.4.0andmain, so both have the bug.Fix
Every subagent ends by calling
SubagentHandbackto give its report to the lead. The Claude adapter now reads aPostToolUseof that tool (with anaid) asworker.stop, and stages nothing for itsPreToolUseor a failed attempt. WhereSubagentStopdoes fire too (about 30 ms later in Claude Code 2.1.201), that second stop does nothing, because the helper is already on its way out.Tests
06-subagent-handback.jsonl, taken from the real session with ids anonymized. The reducer and director tests both fail without the fix.SubagentStop.yarn lint,yarn typecheck,yarn testandyarn format:checkall pass.Patch changeset included.