Repository navigation
Conversation
Tree of pingdotgg/t3code@69a7f1c, the earliest commit a review bot commented on (MIT).
csdev19
left a comment
There was a problem hiding this comment.
Wachiman 1.12.0, local run (wachiman local --commit HEAD, Claude Opus 5.5, effort high, isolated profile). Coverage: 5 of 5 changed files. 1 finding, posted inline. No findings outside the diff.
Summary: The change moves the subagent pending-request logic into @t3tools/shared and has the relay republish a top-level thread when one of its subagents waits on the user, so the parent's row shows "Approval needed" or "Waiting for input". The client refactor changes no behaviour, and the tests assert the right things. One fix: the server's in-memory subagentRequests map is only updated while publishing is enabled and linked, and nothing clears or rebuilds it. If publishing is turned off and back on, a parent can stay stuck on "Approval needed" after its child's request has resolved.
| // domain event, so materializing the full shell here would make the cost | ||
| // of one thread's activity proportional to how many threads exist. | ||
| const threadShell = yield* threads.getThreadShell(threadId); | ||
| yield* trackSubagentRequest(threadId, threadShell); |
There was a problem hiding this comment.
Severity: fix (bug, confidence medium)
Claim: Subagent request map goes stale while publishing is disabled or unlinked, so the parent can stay stuck on "Approval needed"
Reasoning: trackSubagentRequest only runs after the publication-disabled and missing-relay-config early returns (lines 466-483), but subagentRequests (line 401) is never cleared or rebuilt. Here is a sequence that breaks it. A child raises an approval while publishing is on, so its entry is stored and the parent is published as waiting_for_approval. Then publishing is turned off, for example with t3 connect publish from another process. While it is off, the child's request resolves and its run ends. Those events return before line 546, so the entry stays. When publishing is turned back on, nothing rebuilds the map: the startup snapshot runs only once, because activeSnapshotPublishedRef is never reset (lines 806-811). The parent's next event then publishes the stale "approval" from pendingSubagentRequestFor at line 568. The child has finished and sends no more events, so nothing corrects the parent's row, and the user's activity card keeps showing "Approval needed" with no error. resetPublishedConnection clears publishedStateByThreadRef but not this map. One fix: run trackSubagentRequest (it already has the shell) before the gates, but only for subagent shells, so the disabled path doesn't get a shell read on every event. Another: clear subagentRequests in resetPublishedConnection and reset activeSnapshotPublishedRef so a catch-up rebuilds the map from the shell snapshot.
Wachiman 1.12.0, local run
Replay of pingdotgg/t3code#24079, merged 2026-11-09.
This is a replay for a code-review benchmark, not a contribution. The code is from pingdotgg/t3code (MIT License;
LICENSEis in the tree).baseRefOidand the head)The diff of this PR equals the original base..head diff. Reference bot threads: https://github.com/niway-dev/wachiman-benchmarks/blob/docs/t3code-replays/t3code/replays/24079/bot-threads.md
🤖 Generated with Claude Code