Duo CLI auto mode (beta)

How GitLab team members can turn on and test the beta auto mode in Duo CLI, and the risks of using it.

Overview

Auto mode is a beta Duo CLI mode that runs tools without asking for approval first. It is available to GitLab team members for dogfooding and testing only. It is not yet promoted to customers.

Progress is tracked in the auto mode rollout epic.

Prerequisites

  • Duo CLI v9.22.0 or later. Use the latest version if you can.
  • The duo_auto_mode feature flag must be enabled for your top-level group. If it is not, ask on the auto mode feedback issue.

Turn on auto mode

The feature flag alone is not enough. The Auto mode setting defaults to off, so you must also turn it on for a group or project.

Turn on auto mode for a group

Use this to turn on auto mode for every subgroup and project in a group.

  1. In the top bar, select Search or go to and find your group.
  2. Select Settings > GitLab Duo.
  3. Select Change configuration.
  4. From the Auto mode dropdown list, select one of:
    • On by default: on for all subgroups and projects. Subgroups and projects can still turn it off.
    • Off by default: off, but subgroups and projects can turn it on.
    • Always off: off, and locked so subgroups and projects cannot turn it on.
  5. Save your changes.

Turn on auto mode for a project

Use this to turn on auto mode for a single project.

  1. In the top bar, select Search or go to and find your project.
  2. Select Settings > General.
  3. Expand GitLab Duo.
  4. Turn on Auto mode.
  5. Save your changes.

If a parent group is set to Always off, the project setting is locked and you cannot change it.

Use auto mode

To use auto mode:

  1. Restart Duo CLI in the project so it picks up the new setting.
  2. Press Tab to cycle through the modes: build, plan, and auto. Auto mode shows in yellow with a & prefix.
  3. Send a prompt. Auto mode takes effect from that prompt onward.

Auto mode does not persist. Each new, resumed, or /new session starts in build mode.

To stop using auto mode, press Tab to switch to another mode. The change applies to your next prompt.

Troubleshooting

If auto does not appear when you press Tab:

  1. Confirm the duo_auto_mode feature flag is enabled for your top-level group.
  2. Confirm the Auto mode setting is on for the project, or on by default from its group.
  3. Confirm a parent group is not set to Always off.
  4. Restart Duo CLI.

Some tools can still ask for approval in auto mode. This is expected when an administrator’s policy requires approval for them.

Feedback

Share what worked, what was confusing, and any safety concerns on the auto mode feedback issue.