github / github/copilot-cli

Background sub-agents (general-purpose) get stuck indefinitely, never complete

Offen
#3,350 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:agents
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

## Description

Background sub-agents launched via the `task` tool with `mode: "background"` and `agent_type: "general-purpose"` sometimes get stuck and never complete. The agent shows as "running" indefinitely. No completion notification arrives. `read_agent` with `wait: true` and a timeout returns the agent still running.

This doesn't happen every time, but it's frequent enough to be a real workflow blocker. The workaround is to abandon the stuck agent and re-launch as parallel `explore` agents instead, which reliably complete.

## Steps to Reproduce

1. Start an interactive Copilot CLI session
2. Launch a background general-purpose agent with a moderately complex prompt (e.g. scanning multiple directories, reading 20+ files, synthesising findings)
3. Wait for completion notification

## Expected Behaviour

The agent completes within a reasonable time (1-5 minutes) and sends a completion notification.

## Actual Behaviour

The agent stays in "running" state indefinitely. After 20+ minutes with no progress, the only option is to abandon it and work around the problem.

Notably, splitting the same work into 3 parallel `explore` agents completes in under 60 seconds each. The `general-purpose` agent type seems to hang on tasks that `explore` handles fine.

## Frequency

Observed in multiple sessions over the past week. Roughly 1 in 3 general-purpose background agents gets stuck. Explore agents have never gotten stuck for me.

## Environment

- Copilot CLI version: 1.0.34
- OS: macOS Tahoe 26.3.1 (Apple Silicon)
- Shell: zsh
- Terminal: Ghostty

## Workaround

Replace `general-purpose` background agents with parallel `explore` agents for read-heavy tasks. This reliably completes but limits you to Haiku and read-only tools.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with the task tool's background mode for general-purpose agents and the read_agent wait path in an interactive Copilot CLI session. Reproduce the issue using a moderately complex, multi-directory prompt and compare it with parallel explore agents. Done means the background agent completes within a reasonable time and sends its completion notification instead of remaining running indefinitely.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
ai, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.