github / github/copilot-cli

Allow switching to autopilot mode mid-task (restore pre-0.0.421 behavior)

未關閉
#2,203 1 則留言 11 個 reaction 已指派 0 人 在 GitHub 檢視
area:agents
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

Before version 0.0.421, I could switch from normal/interactive mode to autopilot mode using Shift+Tab while the agent was actively working on a task. This was critical for my workflow — I'd start a task in normal mode, review the agent's initial approach, and then switch to autopilot mid-task when I needed to step away (meetings, breaks, etc.). Autopilot would then handle ask_user questions and direct the agent autonomously. Since 0.0.421 (PR #3944), the autopilot permission dialog only appears on the next prompt submission, making it impossible to switch to autopilot during an active task. The mode change is essentially queued for the next prompt instead of applying immediately.

### Proposed solution

Restore the ability to switch to autopilot mode mid-task via Shift+Tab (or the mode switcher)
so it takes effect immediately, even while the agent is actively working. The permission
elevation dialog can still appear — just show it at the moment of mode switch like before,
rather than deferring it to the next prompt. This could coexist with the current behavior: if
the user switches modes while idle, apply it on next prompt. If they switch while the agent is
active, apply it immediately.

### Example prompts or workflows

1. I start a task in normal mode: "Refactor the auth module to use JWT tokens." The agent
begins working and asks me questions. I review a few, then realize I need to leave for an hour.
I press Shift+Tab to switch to autopilot — the agent continues autonomously, handling its own
questions.
▎ 2. I submit a complex task in interactive mode to supervise the agent's plan. Once I'm
confident in the direction, I switch to autopilot mid-task so it can finish without waiting on
me for every file edit approval.
▎ 3. I'm working late and the agent is on a long task. I want to go to sleep but let the agent
keep going. I switch to autopilot mid-execution so it won't block on ask_user calls overnight.

### Additional context

The specific change that introduced this regression is in version 0.0.421, linked to PR
https://github.com/github/copilot-agent-runtime/pull/3944 — "Autopilot permission dialog appears
on first prompt submission instead of on mode switch." I've had to pin my CLI to version
0.0.420 to retain this workflow. I'm on Windows 11, using Copilot CLI via both VS Code terminal
and standalone terminal. This isn't an edge case — anyone who uses Copilot for longer tasks (30+
minutes) will likely encounter situations where they need to step away and switch to autopilot
mid-task. The current behavior forces users to predict upfront whether they'll be available for
the entire duration of a task, which isn't realistic.

Image
Image
Image

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 Shift+Tab 或 mode-switcher 路徑,並比較 PR #3944 引入的行為。完成的標準是:在進行中的工作期間從一般模式或互動模式切換至 autopilot 時,切換會立即生效,並在當下顯示權限對話框;而在閒置時切換則保留目前的 next-prompt 行為。確認後續的 ask_user 問題不會阻塞進行中的工作。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。