Skip to content

Commit c42ace3

Browse files
hubwriterCopilotCopilot
authored
Document stayInAutopilot setting for Copilot CLI autopilot mode (#62334)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent f5f0de1 commit c42ace3

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

content/copilot/concepts/agents/copilot-cli/autopilot.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ When entering autopilot mode, if you have not already granted {% data variables.
5959

6060
You will get the best results from autopilot mode if you enable all permissions. If you choose to continue with limited permissions, {% data variables.product.prodname_copilot_short %} will automatically deny any tool requests that require approval, which may prevent it from completing certain tasks. You can change your mind later and grant full permissions, during an autopilot session, by using the `/allow-all` command (or its alias `/yolo`).
6161

62+
## Staying in autopilot mode between tasks
63+
64+
By default, autopilot mode applies only to the current task. Once {% data variables.product.prodname_copilot_short %} determines that the task is complete, {% data variables.copilot.copilot_cli_short %} automatically switches back to the standard interactive mode. To run another task in autopilot mode, press <kbd>Shift</kbd>+<kbd>Tab</kbd> and cycle through the available modes until you re-enter autopilot mode, then enter your next prompt.
65+
66+
If you regularly run several tasks in autopilot mode, you can configure the CLI to stay in autopilot mode after each task completes, by enabling the `stayInAutopilot` setting. You can do this in either of the following ways:
67+
68+
* During an interactive session, enter `/settings stayInAutopilot true`.
69+
* Add `"stayInAutopilot": true` to your user configuration file (`~/.copilot/settings.json`). For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#user-settings-copilotsettingsjson).
70+
71+
When this setting is enabled, {% data variables.product.prodname_copilot_short %} remains in autopilot mode after a task completes, so the next prompt you enter is also handled in autopilot mode. You can switch back to interactive mode at any time by pressing <kbd>Shift</kbd>+<kbd>Tab</kbd>.
72+
73+
> [!NOTE]
74+
> This setting only controls which mode you are in _after_ a task completes. It does not cause {% data variables.product.prodname_copilot_short %} to keep working after it has decided the task is done. Autopilot still stops when the task is complete, when a problem occurs, when you press <kbd>Ctrl</kbd>+<kbd>C</kbd>, or when the continuation limit is reached.
75+
6276
## Comparing autopilot mode, `--allow-all`, and `--no-ask-user`
6377

6478
`--allow-all`, and its alias `--yolo`, are permissions-related options that you can pass to the `copilot` command when you start an interactive session. For a full list of available options, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#command-line-options).

content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ These settings apply across all your sessions and repositories. You can use the
490490
| `showTipsOnStartup` | `boolean` | `true` | Show a random command tip when the CLI starts. |
491491
| `skillDirectories` | `string[]` | `[]` | Additional directories to search for custom skill definitions (in addition to `~/.copilot/skills/`). |
492492
| `statusLine` | `object` || Custom status line display. `type`: must be `"command"`. `command`: path to an executable script that receives session JSON on stdin and prints status content to stdout. `padding`: optional number of left-padding spaces. |
493-
| `stayInAutopilot` | `boolean` | `false` | Stay in autopilot mode after an autopilot task completes, instead of reverting to interactive mode. |
493+
| `stayInAutopilot` | `boolean` | `false` | Remain in autopilot mode after each task completes. When enabled, the next prompt you enter after a task completes is also handled in autopilot mode. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot#staying-in-autopilot-mode-between-tasks). |
494494
| `storeTokenPlaintext` | `boolean` | `false` | Allow authentication tokens to be stored in plain text in `config.json` when no system keychain is available. |
495495
| `stream` | `boolean` | `true` | Enable streaming responses. |
496496
| `streamerMode` | `boolean` | `false` | Hide preview model names, quota details, prompt timestamps, and the update-available notice. Useful when demonstrating {% data variables.copilot.copilot_cli_short %} or screen sharing. |

0 commit comments

Comments
 (0)