Skip to content

task_complete tool unavailable after switching back to autopilot mode #4161

Description

@AlexMalfr

Describe the bug

This appears to be a regression of #1523.

That issue was closed after a maintainer stated that, as of v1.0.4:

The task_complete tool is now always available in autopilot mode and can no longer be filtered out.

However, I'm on Copilot CLI 1.0.71 and my session logs show a system prompt stating that the task_complete tool is not available after switching to autopilot mode.

Image

It says in French: I cannot call task_complete in this session because the tool is unavailable. This occurs 3 times in a row after finishing the request (and also earlier in the conversation the day before)


This loop appears to have been actually deducted Copilot Premium Requests from my quota. I'm still on request-based billing because I'm on a legacy annual Copilot Pro+ plan and have not migrated to usage-based billing yet.

Image

On 2026-07-17, my only Copilot usage was this Copilot CLI session (continued from the previous day). My billing usage dashboard recorded 24 premium requests.

For GPT-5.4, one request costs 6 premium requests on my plan. The event log for that date contains:

  • one real user-initiated GPT-5.4 request
  • three subsequent user-message events with "isAutopilotContinuation": true

Affected version

GitHub Copilot CLI 1.0.71.

Steps to reproduce the behavior

Session logs excerpt available below

The relevant chronology in one long-lived session is:

  1. The session starts in interactive mode with GPT-5.4

  2. The mode changes interactive → plan → autopilot

  3. In this first autopilot phase, task_complete is available and is successfully called:

    • an assistant.message requests the task_complete tool
    • tool.execution_start records the call
    • tool.execution_complete records success: true
    • session.task_complete records success: true
  4. The mode changes autopilot → interactive

  5. On the next real user message, the transformed prompt contains:

    <tools_changed_notice>
    Tools no longer available: task_complete
    Important: Do not attempt to call tools that are no longer available unless you've been notified that they're available again.
    </tools_changed_notice>
    
  6. The mode then changes interactive → plan → autopilot.

  7. The new autopilot system prompt still contains the full task_complete tool instructions and says that the agent must call it to finish.

  8. Once the requested work and all todos are complete, Copilot injects an automatic continuation saying:

    You have not yet marked the task as complete using the task_complete tool.
    
  9. The assistant repeatedly states that the task is complete but that task_complete is not available in the session.

  10. Autopilot nevertheless starts another turn and displays Continuing autonomously (1 premium request) each time.

The runtime therefore appears to remove task_complete when returning to interactive mode, while the autopilot controller and system prompt still treat that tool as the mandatory completion mechanism after switching back to autopilot.

Expected behavior

The task_complete tool should be available to the model, no matter what mode it is in.

Additional context

  • GitHub Copilot CLI: 1.0.71
  • Session ID: bff63182-c992-4f71-a211-71d282b8b969
  • Model: GPT-5.4
  • Reasoning effort: high
  • OS: Windows 11 Pro 25H2 26220.7271
  • Architecture: x64
  • Terminal: Windows Terminal
  • Shell: PowerShell 5.1.26100.7271
  • Billing model: legacy request-based billing (legacy annual Copilot Pro+ subscription)

Session logs (event.jsonl) shortened and redacted by ChatGPT to remove my prompts and irrelevant info: copilot-cli-task-complete-redacted.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions