You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
list_agents returns empty while background agents are still visibly running in UI #3514
Bug: list_agents shows no agents while tasks are still active in UI
Description
When multiple background agents are launched during a session, calling list_agents returns <no background agents> even though the user can see 7 active agents in the Copilot CLI tasks UI. The assistant incorrectly concludes "no agents running" and calls task_complete, while agents are still executing in the background.
Steps to Reproduce
Start a Copilot CLI session
During a complex review task, background agents are launched (e.g., explore agents for parallel codebase investigation)
After the main analysis completes, call list_agents
list_agents returns <no background agents>
Meanwhile, the user sees 7 active tasks in the UI task list
Expected Behavior
list_agents should return all currently running background agents, matching what the user sees in the UI.
Actual Behavior
list_agents returns empty (<no background agents>) while the UI shows 7 active agents still running. The assistant has no way to detect or stop these orphaned agents.
Impact
Assistant cannot detect running agents → cannot stop them
Assistant incorrectly reports "no agents running" to the user
Orphaned agents consume resources silently
User has to manually identify and stop stale agents
Breaks the HITL trust model — assistant says one thing, UI shows another
Environment
Copilot CLI version: 1.0.54
Model: Claude Opus 4.6
OS: macOS (Darwin)
Additional Context
The agents were likely launched in a previous checkpoint/compaction cycle. After context compaction, the agent IDs may have been lost from the conversation context, making them invisible to list_agents but still running in the runtime.
Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.96), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.
Activity
patniko commentedon Oct 26, 2026
Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.96), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.