github / github/copilot-cli

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

Open
#2,881 3 comments 0 reactions 0 assignees View on GitHub
area:agents
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.