SubagentHandback falsely reports "no longer running" when the caller is an in-process teammate; report is lost

Status Open
Reported on v2.1.284
Maintainer reply None cached
Activity 0 comments · opened Sep 30, 2026

Bug Description
What happened: A foreground Explore subagent, spawned by an in-process agent-team teammate, calls SubagentHandback. The call returns "Nothing was sent: the agent that spawned you is no longer running." The caller was alive. It was blocked on that Agent call, then got "The subagent ended without delivering a report", then kept working for 20+ minutes. All 3 reports were lost. After each failure, [handback-send-enforce] asked for the call again, up to the bounce cap of 3, although every retry must fail.

Expected: SubagentHandback delivers to a live teammate caller. Or, after a caller-gone failure, enforcement stops and the plain-text report is delivered.

Repro: Run an agent team (in-process teammates, auto mode, non-interactive). A teammate spawns an Explore subagent in the foreground. The subagent calls SubagentHandback. The call fails every time, and the caller gets "no report was delivered".

Evidence: CLI 2.1.284 and 2.1.285, darwin arm64, 2026-09-29. 3 of 3 occurrences. Subagent: agentType Explore, requestShape foreground, spawnDepth 1. Caller: taskKind in_process_teammate, requestShape background. Request IDs: req_011CfYP8muitmdw2EbyNXjzk, req_011CfYPFjqACx1sVsEzx2YPo, req_011CfYQbdkDikCiGq6hfBBHe, req_011CfYQEvC6GLrzkaQHhBSkY.

Cause (read from the 2.1.285 bundle): SubagentHandback.call sends to a non-main caller only when ZVe(registry.get(recipient)) is true. ZVe requires e.type === "local_agent" and status "running". An in_process_teammate caller fails this check even while it waits on the Agent call. The turn-end enforcement ([handback-send-enforce]) checks only for a missing delivery and handbackBounces < 3. It never checks whether the caller is alive, so it asks for retries that cannot succeed.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.282
  • Feedback ID: 381eff83-3d0a-4357-b067-a22bcdf06037

View original on GitHub ↗