Duo CLI auto mode (beta)
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.
Auto mode lets the agent act on your machine and on GitLab without asking you first. Where your settings allow it, the agent can:
- Run any shell command, including commands that delete files or change your system.
- Run
gitcommands, including commits and pushes. - Write to GitLab: create or update issues, merge requests, and other resources.
- Run MCP tools and start flows.
The agent can make mistakes, and content it reads (files, issues, merge requests, web pages) can contain instructions that steer it (prompt injection). To limit the risk:
- Use auto mode only in repositories you trust and on disposable branches.
- Do not use it on machines or shells that have production or other sensitive credentials loaded.
- Stay in the session and review every change before you merge it.
- Switch back to
buildmode when you do not need auto mode.
Prerequisites
- Duo CLI v9.22.0 or later. Use the latest version if you can.
- The
duo_auto_modefeature 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.
- In the top bar, select Search or go to and find your group.
- Select Settings > GitLab Duo.
- Select Change configuration.
- 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.
- Save your changes.
Turn on auto mode for a project
Use this to turn on auto mode for a single project.
- In the top bar, select Search or go to and find your project.
- Select Settings > General.
- Expand GitLab Duo.
- Turn on Auto mode.
- 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:
- Restart Duo CLI in the project so it picks up the new setting.
- Press Tab to cycle through the modes:
build,plan, andauto. Auto mode shows in yellow with a&prefix. - 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:
- Confirm the
duo_auto_modefeature flag is enabled for your top-level group. - Confirm the Auto mode setting is on for the project, or on by default from its group.
- Confirm a parent group is not set to Always off.
- 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.
ded65f5a)
