droid exec uses tiered autonomy to control what operations the agent can perform. Only raise access when the environment is safe.
Level
Intended for
Notable allowances
(default)
Read-only reconnaissance
File reads, git diffs, environment inspection
--auto low
Safe edits
Create/edit files, run formatters, non-destructive commands
--auto medium
Local development
Install dependencies, build/test, local git commits
--auto high
CI/CD & orchestration
Git push, deploy scripts, long-running operations
--skip-permissions-unsafe
Isolated sandboxes only
Removes all guardrails (⚠️ use only in disposable containers)
Examples:
# Default (read-only)droid exec "Analyze the auth system and create a plan"# Low autonomy - safe editsdroid exec --auto low "Add JSDoc comments to all functions"# Medium autonomy - development workdroid exec --auto medium "Install deps, run tests, fix issues"# High autonomy - deploymentdroid exec --auto high "Run tests, commit, and push changes"
--skip-permissions-unsafe removes all safety checks. Use only in isolated environments like Docker
containers.
Press ! when the input is empty to toggle bash mode. In bash mode, commands execute directly in your shell without AI interpretation—useful for quick operations like checking git status or running npm test.
Toggle on: Press ! (when input is empty)
Execute commands: Type any shell command and press Enter
Toggle off: Press Esc to return to normal AI chat mode
The prompt changes from > to $ when bash mode is active.
Use -w, --worktree [name] to run a session inside a native git worktree so you can work on multiple branches of the same repository in parallel without file conflicts. This flag is available on both droid (interactive) and droid exec.Each worktree is created as a sibling directory next to your repo (../<repo>-wt-<branch>/) with its own checkout and dedicated branch.Branch naming:
--worktree (no value) — Creates/reuses a worktree on a branch named <current-branch>-wt.
--worktree <name> — Uses <name> as the branch. If the branch already exists, it is checked out in the worktree; otherwise it is created from HEAD.
If the target branch is already checked out in another worktree, the command fails with a clear error.
Examples:
# Interactive: derive branch from current branch (creates <current>-wt)droid --worktree# Interactive: explicit branch namedroid -w fix-auth-bug "start debugging the login flow"# Headless: isolate an automated task on its own branchdroid exec --worktree refactor-tests --auto medium "migrate jest suites to vitest"# Run two parallel sessions on the same repo, each on its own branchdroid --worktree feature-a &droid --worktree feature-b &
Session lifecycle:
Interactive mode — The worktree persists after the session ends so you can resume work, inspect changes, or push the branch.
droid exec mode — On exit, a clean worktree (no uncommitted changes) is removed automatically; a dirty worktree is preserved and its path is printed so you can review the work.
The underlying git branch is never deleted by Droid — only the worktree directory is removed during cleanup.
When --worktree is active, Droid operates entirely inside the worktree directory. Run follow-up
commands (tests, builds, installs) from that directory rather than the original repo root. Fresh
worktrees may not have dependencies installed yet (for example node_modules) — set them up if
builds or tests fail with missing-module errors.
The /mcp slash command opens an interactive manager UI for browsing and managing MCP servers.Quick start: Type /mcp and select “Add from Registry” to browse 40+ pre-configured servers (Linear, Sentry, Notion, Stripe, Vercel, and more). Select a server, authenticate if required, and you’re ready to go.CLI commands for scripting and automation:
# Local review workflow> /review# Analysis via exec (non-interactive)droid exec "Review this PR for security issues"# With modificationsdroid exec --auto low "Review code and add missing type hints"
# Investigationdroid exec "Analyze failing tests and explain root cause"# Fix and verifydroid exec --auto medium "Fix failing tests and run test suite"
# Work on two branches of the same repo at the same time, each in its own worktreedroid --worktree feature-a &droid --worktree feature-b &# Fan out headless tasks across branches without clobbering each other's filesdroid exec -w migration-step-1 --auto medium "apply codemod A" &droid exec -w migration-step-2 --auto medium "apply codemod B" &wait