All Learn pages

Get started in the terminal

The agentduo npm package installs duo: the chat in your terminal with a live view of both agents, and commands that run the pipeline unattended. agentduo is the same command, for when another tool already owns the name duo.

On this page

Install

You need Node.js 22.12 or later, Git, and both CLIs signed in (What you need).

Terminal

npm i -g agentduo
duo --version

Set up a workspace

The workspace is the folder you run duo in (or the one given with --dir). It can be a subfolder of a repository: then only that folder’s changes go to the reviewer.

Terminal

cd my-project
duo init
duo doctor
  • duo init creates .agentduo/config.yaml, where every setting is commented out, with the gates it detected (for example npm run test from package.json) as suggestions. It also creates .agentduo/.gitignore, which keeps run data out of Git, and offers git init when the folder is not a repository yet.
  • duo doctor checks Node, Git, the configuration and both CLIs, and calls no model. It ends with doctor: ready or doctor: problems found.

Chat with both agents

Run duo without a task to open the chat. The line under the input says who your message goes to: Codex in a new chat, then whoever you picked last.

duo

duo
› What does src/auth do, in two sentences?
› /claude Would you split it differently?
› /discuss Is the token check safe against replay?
  • /claude <question> and /codex <question> ask one agent; /claude or /codex alone switches who your next messages go to. Both agents see the whole conversation.
  • /discuss <question> has both agents work out one answer, and Codex sums it up. Discussions.
  • Typing / opens the list of commands, filtered as you type. /help lists them too.
  • Esc stops what is running. /quit (or Ctrl+C twice) leaves; a running pipeline stops at its step and stays resumable.

Run the pipeline

Inside a Git repository, hand a task to the full workflow:

duo

/pipeline Add a --json flag to the export command, with tests

The live view shows each step, the agent working on it and what the agents hand each other. While it runs, a message you type becomes a note for the next step. When it ends, review the changes with git diff and commit them yourself.

Your first task walks through a complete run; The pipeline explains every step.

In scripts and CI

Give duo a task to run the pipeline once and exit. Without a terminal (in CI, in the background, with output piped) it prints plain timestamped lines.

Terminal

duo --accept-edits "Fix the failing date test"
echo "exit code: $?"
What the exit code means
Exit codeMeaning
0The run is done.
2The run waits for your decision. Answer it with duo resume --decision resume|revise|abort [--note "..."].
1, 3, 130A configuration or environment error, an aborted run, or a stopped run that can be resumed. Exit codes.

Note

Nobody can answer a permission prompt in CI, so Claude denies the tool calls its settings do not allow. Allow what the implementer needs in advance: unattended runs.