Skip to content

Autopilot enters an infinite loop #2374

Closed
Closed

Description

@Jorge-Torselli

Describe the bug

I was using cli with autopilot and assign a task, the flow was created the prompt using /plan once it finished show me the plan to approve it and suggested to run in autopilot but when it was done entered a infinite loop I paste here some of the messages I was reading did like 11 or 12 loops, then I cancelled because the task was done and the model even stated it was done but keep recurring once and once again. Here are some messages the model was printing in screen:

● There is no unfinished work on this task.

VentaRapida is already fully implemented and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible Existencia actual: N / Tipo: Servicio indicator added
  • resets on init, clear, and successful add
  • Select2 unchanged
  • backend unchanged
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

I cannot call task_complete because that tool is not available in this session.

● Continuing autonomously (1 premium request)

● The task is complete.

Verified final result:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible stock/service indicator added
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

No work remains.

● Continuing autonomously (1 premium request)

● Nothing remains to implement for this request.

VentaRapida is complete and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible Existencia actual: N / Tipo: Servicio indicator added
  • resets on init, clear, and successful add
  • Select2 unchanged
  • backend unchanged
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

This task is done.

● Continuing autonomously (1 premium request)

◐ I need to provide answers without getting caught in a repetitive loop. I wonder if I should ask the user for clarification, but it doesn't seem necessary. Since the task is marked
as unavailable, I should keep my responses concise. The user’s messages feel like constant reminders. I should mention that I can't call this unavailable tool again. It might be
best to wrap things up without further action.

● No pending work remains.

VentaRapida is already complete and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible stock/service indicator added
  • resets on init, clear, and successful add
  • Select2 unchanged
  • backend unchanged
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

task_complete is not available in this session, so there is no additional completion action I can take.

● Continuing autonomously (1 premium request)

● The task is already complete and verified.

VentaRapida final state:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible Existencia actual: N / Tipo: Servicio indicator added
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

There is no remaining implementation work.

● Continuing autonomously (1 premium request)

● No further work remains for this task.

VentaRapida is complete and verified:

  • updated CapaAplicacion\Pages\Venta\VentaRapida.cshtml
  • added visible stock/service indicator
  • added resets on init, clear, and successful add
  • left Select2 and backend unchanged
  • validated with dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

This request is done.

● Continuing autonomously (1 premium request)

● There is no unfinished work on this request.

VentaRapida is fully complete and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible Existencia actual: N / Tipo: Servicio indicator added
  • resets on init, clear, and successful add
  • Select2 unchanged
  • backend unchanged
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

No implementation steps remain.

● Continuing autonomously (1 premium request)

● The task is complete.

Final verified result:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible stock/service indicator added
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

There is nothing left to implement.

● Continuing autonomously (1 premium request)

● Acknowledged.

VentaRapida is already complete and verified. No further implementation work remains.

● Continuing autonomously (1 premium request)

● No remaining work. VentaRapida is complete and verified.

● Continuing autonomously (1 premium request)

● Task already complete. No pending implementation remains.

● Continuing autonomously (1 premium request)

● Operation cancelled by user

Affected version

No response

Steps to reproduce the behavior

  1. Selected plan mode with /plan the entered the prompt, asked to show and wait my approval to continue
  2. It showed the plan, and recommended to run autopilot
  3. keep running as I showed at the sart of the bug

This was an update task on razor pages project, it did involved 3 screens but went and did one then when finished told it to plan the second one to perform the same in the second page, and on the third ommited the plan and wen to autopilot

● Task status is unchanged: already complete.

Completed:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml
  • visible Existencia actual: N / Tipo: Servicio indicator
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes

Verified:

  • dotnet build ZeusVentaRapida.sln --no-restore
  • Build succeeded

I cannot perform the requested task_complete action because that tool was removed from this session.

● Continuing autonomously (1 premium request)

● There is no unfinished work on this request.

VentaRapida is already implemented and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml
  • visible stock/service indicator
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

The repeated completion prompt is stale automation. The task_complete tool is not available in this session, so there’s no additional action I can take for this finished task.

● Continuing autonomously (1 premium request)

◐ I think it might be essential to respond to the user in a way that helps them move past a stale reminder. I want to avoid looping back to the same point, so I'll try to address
their needs without just saying I can't help. Perhaps it would be beneficial to ask what their next task is! I'll make sure to keep my response concise and focused since no tools
are needed here.

● This task is finished.

Completed and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml
  • visible Existencia actual: N / Tipo: Servicio indicator
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

The repeated reminder is stale. task_complete is unavailable in this session, so I cannot mark it with that tool.

● Continuing autonomously (1 premium request)

◐ I think the user might be caught in an automated reminder loop. Instead of repeating the same final message, it could be more effective to explain that the tool isn't available
and ask what they would like to do next. I considered using a method to ask the user directly, but it seems better to keep it concise. There's no need to overcomplicate things
with SQL or reports—just a clear and direct response should work!

● No remaining work is pending.

VentaRapida is already complete and verified:

  • CapaAplicacion\Pages\Venta\VentaRapida.cshtml updated
  • visible stock/service indicator added
  • resets on init, clear, and successful add
  • no Select2 changes
  • no backend changes
  • dotnet build ZeusVentaRapida.sln --no-restore → Build succeeded

The repeated message is an automated stale reminder. task_complete is not available in this session, so I can’t mark it with that tool.

● Continuing autonomously (1 premium request)

◐ It looks like I'm stuck in a loop because the tool I need is unavailable, making it impossible to satisfy the request. I’m considering if I should ask the user for clarification,
but it seems that wasn’t their intent. Calling exit_plan_mode feels irrelevant here. I think the best approach might be to provide a concise final note to wrap this up. It's all
about finding a way to respond effectively!

Expected behavior

No response

Additional context

Operating system Windows 11

Activity

  1. changed the title [-]Autopilot enter an infinite loop[/-] [+]Autopilot enters an infinite loop[/+] on Mar 28, 2026
  2. Jorge-Torselli commented on Mar 28, 2026

    @Jorge-Torselli
    Author

    This is teh actually used premium requests on the loop it entered

    Total usage est: 138 Premium requests
    API time spent: 19m 42s
    Total session time: 1h 16m 2s
    Total code changes: +276 -10
    Breakdown by AI model:
    gpt-5.4 17.5m in, 40.2k out, 17.1m cached (Est. 138 Premium requests)
    gpt-5.3-codex 550.7k in, 9.8k out, 495.5k cached (Est. 0 Premium requests)

  3. added
    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents
    on Apr 6, 2026
  4. phni-sc commented on Apr 15, 2026

    @phni-sc

    I'm using 1.0.25 and just experienced the exact same issue. #1523 claims that this was fixed in 1.0.4, but this does not appear to be true.

  5. Jorge-Torselli commented on Apr 16, 2026

    @Jorge-Torselli
    Author

    Using now 1.0.31 and happened again! same thing...

  6. clivehywong commented on Apr 17, 2026

    @clivehywong

    Same here... It burned me around 100 premium requests... I was using VS Code to connect to server via ssh, not sure if the instability in the network cause the issue... VS code reconnect itself / manual reconnect / refresh quite frequently. And the task was paused during reconnections. Now I use tmux before I call copilot, not sure if it will improve the situation...

  7. illumeow commented on Apr 24, 2026

    @illumeow

    same here. using v1.0.35 on macOS 26.4 (25E246). I am not using ssh and having a stable wifi so there should be no network issue. It burned my session quota.

  8. mrth2 commented on Apr 26, 2026

    @mrth2

    Same here. Copilot CLI latest, GPT-5.4 ran into an endless loop and burned my last 43 premium requests of the month. I left it running there for a quick bug fix and went for lunch. I can't believe it ran into this issue. What would happen if I turned on auto-purchase for extra requests? Would it burn all my credit?

  9. ppedrotti commented on Apr 26, 2026

    @ppedrotti

    Here is the chat after running /troubleshoot (you may need to translate first) and the debug logs. On this conversation Autopilot did not stop after it was confirmed that the task could not be done and had to be stopped manually.

    agent-debug-log-97da3af7-351f-4aa1-b18e-d2b80b3a479d.json
    chat.json

  10. copilot-cli-bot commented on Nov 13, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.110. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions