github / github/copilot-cli

Autopilot mode enters infinite loop, draining premium requests until manually cancelled

Ouverte
#2,881 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:agents
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

### Describe the bug

After enabling autopilot mode, the assistant entered an infinite self-repeating loop, continuously printing `● Continuing autonomously (1 premium request)` without making any progress or stopping on its own. Each iteration consumed a premium request, and the only way to stop it was to forcefully cancel with `Ctrl+C`.

The loop appeared to be triggered by a disagreement between the assistant and what seemed to be an automated system message repeatedly telling it to call `task_complete`. The assistant correctly refused (since no actual task had been defined), but instead of surfacing this conflict to the user or exiting gracefully, it fell into an unrecoverable loop.

### Affected version

GitHub Copilot v1.0.34
Model: Auto → Claude Haiku 4.5

### Steps to reproduce the behavior

1. Start a GitHub Copilot CLI session (model: Auto, which resolved to Claude Haiku 4.5)
2. Have a general conversation with the assistant (no active coding task)
3. Enable autopilot mode (autopilot mode gets enabled with all permissions)
4. Instruct or wait for the assistant to attempt using `task_complete`
5. The assistant refuses because there is no defined task
6. Observe the session entering an infinite loop, printing `● Continuing autonomously (1 premium request)` on every iteration
7. Each loop iteration consumes one premium request
8. The loop does not stop on its own — requires `Ctrl+C` to terminate

### Expected behavior

When the assistant cannot resolve an ambiguity (e.g., no task is defined and `task_complete` cannot be called), it should:
- Surface the conflict clearly to the user
- Wait for user input rather than looping autonomously
- OR exit autopilot mode gracefully with an explanation

It should NOT silently loop and consume premium requests indefinitely.

### Additional context

The full exported session transcript is attached (Session ID redacted). It includes the assistant's **internal Reasoning blocks**, which clearly show the model was aware it was stuck in a loop — at one point explicitly stating *"This is clearly a loop"* — yet had no mechanism to break out of it or alert the user.

Key observations from the transcript:
- The message `● Continuing autonomously (1 premium request)` appeared **17 times** during the session, meaning **17 premium requests were silently consumed** by the loop with no useful work done
- The loop ran for approximately **2 minutes 30 seconds** (from ~9m to ~11m 39s in the session timeline) before being force-stopped
- The assistant's reasoning was sound throughout; the failure was in the autopilot system having no exit condition
- The only resolution was a forced `Ctrl+C` cancellation by the user

**Environment:**
- **OS:** Windows 11 25H2
- **CPU architecture:** x86_64
- **Terminal emulator:** Windows Terminal
- **Shell:** PowerShell 7.6.0

[copilot-session-xxxx-xxxx-xxxx-xxxx.md](https://github.com/user-attachments/files/26938866/copilot-session-xxxx-xxxx-xxxx-xxxx.md)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by reproducing the autopilot session in GitHub Copilot CLI v1.0.34 using the listed Windows and PowerShell steps, then inspect the exported session transcript for the repeated continuation cycle. Done means an unresolved task_complete conflict surfaces to the user, waits for input, or exits autopilot without repeatedly consuming premium requests.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell
Domaine
cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.