Background subagent can remain running indefinitely after tool activity stops
Describe the bug
A background review subagent remained marked as running long after observable activity stopped. The status stayed at 100 completed tool calls and zero completed turns while elapsed time continued increasing past 15 minutes. The parent session received no result and could not complete the workflow.
Affected version
1.0.83
Steps to reproduce the behavior
- Start a background general-purpose subagent for a final branch review.
- Allow it to perform tool calls.
- Observe the agent reach approximately 100 completed tool calls.
- Continue checking its status after several minutes.
- The agent remains
running, with the tool-call count unchanged and no completed turn or result.
Expected behavior
The runtime should detect stalled subagents, surface the blocked tool or execution state, and either recover, fail with an actionable error, or enforce a bounded timeout. The parent should not wait indefinitely with no progress signal.
Additional context
- Linux
- Copilot CLI 1.0.83
- Observed elapsed time: over 15 minutes
- Status remained: running, 100 tool calls completed, 0 turns completed
- Implementation and the full 78-test regression suite had already completed; the stalled operation was only a final read-only review.
- No private repository content or session logs are attached.
Accuracy update: the agent ultimately returned after approximately 995 seconds (16.6 minutes). The issue is therefore a prolonged apparent stall with no changing progress indicators—not proven infinite execution. During the stall it remained marked running at 100 completed tool calls and 0 completed turns.
To get these things fixed, nobody is going to replicate in github team, use AI to prove it with an example cmnds and tell AI to add the description here with replication steps. The github team will then give these steps to AI and it will only then be fixed.
Writing words are not being fixed at all, no one has time to replicate.
Additional reproduction on Copilot CLI 1.0.117 (Windows):
- Started one background custom panel agent (
pstack-ghcp:panel-1) in a clean detached worktree. Its bounded read-only task was to run onlygit rev-parse --short HEAD. - At 880 seconds,
read_agentreportedrunning,total_turns=0, andtool_calls_completed=1. At 1003 seconds it was stopped as cancelled with 0 turns and no report. This confirms a >16-minute apparent stall; because it was stopped, eventual completion is unknown. - Parent runtime logs show panel-1 and panel-2 preferred model definitions were unavailable/ineligible and fell back to the session model. They also show
MCP skill discovery did not complete: Agent-private MCP skill graph binding is unsupported in this profile; inherited origin protections remain active, plus repeated dropped-event warnings for an unregistered session. These are observed conditions, not a proven causal chain; child-side provider/event-delivery telemetry is unavailable. - No repository content, repository name, PR details, raw session/agent/request IDs, private paths, or credentials are included.
Does this match the long apparent stall described here? What child-side diagnostic trace would identify whether the failure is in first-turn model dispatch or event delivery?