Configuration reference
Every key AgentDuo reads, with its type and built-in default. All keys are optional; Configuration explains where the files live and how they merge.
On this page
Top-level keys
| Key | What it holds |
|---|---|
agents | Which CLI plays each pipeline role |
limits | Rounds, retries, timeouts and sizes |
quality_gates | The review policy: when a run is DONE or stops for you. It runs nothing |
gates | Commands AgentDuo runs after each implementation round (VERIFY) |
safety | Whether to stop before implementing |
claude | How Claude Code is called |
codex | How Codex is called |
paths | Where runs and conversations are kept |
Every key set to its default:
config.yaml
# Every key agentduo reads, set to its built-in default (packages/engine/src/config/config.ts). You never need all
# of this: write only the keys you change.
agents:
planner: codex
plan_reviewer: claude
implementer: claude
code_reviewer: codex
limits:
max_planning_rounds: 4
max_review_rounds: 5
max_discussion_rounds: 3
max_retries: 1
max_consecutive_gate_failures: 3
agent_timeout_sec: 1800
agent_idle_timeout_sec: 900
gate_timeout_sec: 900
max_diff_chars: 120000
max_gate_output_chars: 6000
quality_gates:
require_plan_approval: true
require_tests_pass: true
require_codex_approval: true
stop_on_critical_issue: true
blocking_severities: [critical, high]
review_on_gate_failure: false
gates: []
safety:
pause_before_implement: false
codex:
bin: codex
model: null
args: [--ephemeral]
role_args: {}
claude:
bin: claude
model: null
max_budget_usd: null
permission_prompts: ask
args: [--no-session-persistence]
role_args: {}
paths:
runs_dir: .agentduo/runs- An unknown key is a warning and is ignored.
codex.extra_argsandclaude.extra_args, from agentduo v1, are nowcodex.argsandclaude.args: the old names are ignored with a warning that says so. - A value of the wrong type is an error that names the file. Flags must be
trueorfalse: YAML readsyesandnoas text, and those are rejected.
agents
Each role takes codex or claude. Both may be the same agent. A change applies to the next run, never to one that is going (when a change applies).
| Key | Default | Role |
|---|---|---|
agents.planner | codex | Writes the plan (PLAN) and signs it off (PLAN_FINALIZE) |
agents.plan_reviewer | claude | Critiques the plan (PLAN_REVIEW) |
agents.implementer | claude | Implements the plan and fixes findings (IMPLEMENT) |
agents.code_reviewer | codex | Reviews the changes (CODE_REVIEW) |
.agentduo/config.yaml
# Swap the roles: Claude Code plans and reviews, Codex critiques and implements.
# codex exec is read-only unless told otherwise, so the implementer gets a workspace-write sandbox.
agents:
planner: claude
plan_reviewer: codex
implementer: codex
code_reviewer: claude
codex:
role_args:
implementer: [--sandbox, workspace-write]limits
Every limit applies to the next run, discussion or question; work that is going keeps the limits it started with.
| Key | Type | Default | Effect |
|---|---|---|---|
max_planning_rounds | integer ≥ 1 | 4 | Planning rounds without agreement before the run stops with max_planning_rounds and asks you |
max_review_rounds | integer ≥ 1 | 5 | Implementation and review rounds before the run stops with max_review_rounds |
max_discussion_rounds | integer ≥ 1 | 3 | /discuss: reviews at most before Codex writes the final answer |
max_retries | integer ≥ 0 | 1 | Extra attempts for a pipeline step’s agent call that failed (timed out, went silent, or gave an answer that could not be read). Conversation turns get one attempt |
max_consecutive_gate_failures | integer ≥ 1 | 3 | Rounds in a row with a failing required gate before the run stops with gates_failing |
agent_timeout_sec | integer ≥ 1 | 1800 | Longest an agent call may take |
agent_idle_timeout_sec | integer ≥ 0 | 900 | Stops an agent that prints nothing for this long; 0 turns the check off |
gate_timeout_sec | integer ≥ 1 | 900 | Timeout of a gate without a timeout_sec of its own |
max_diff_chars | integer ≥ 1 | 120000 | Characters of the diff the code reviewer gets; a longer diff is cut, and the reviewer is told |
max_gate_output_chars | integer ≥ 1 | 6000 | Last characters of each gate’s output that go to the reviewer |
The agents’ timeouts stop while a permission prompt waits for you.
quality_gates
The review policy. These keys decide when a run is DONE, goes back to the implementer or stops for you. They run no commands; commands are under gates.
| Key | Type | Default | Effect |
|---|---|---|---|
require_plan_approval | boolean | true | The planner signs off the plan after the critic approves it (PLAN_FINALIZE). With false, the plan the critic approved is final |
require_tests_pass | boolean | true | A failing required gate keeps the run from DONE and sends the work back |
require_codex_approval | boolean | true | The code reviewer must approve. The name is historical: it applies to whichever agent reviews |
stop_on_critical_issue | boolean | true | A critical finding stops the run with critical_finding and asks you |
blocking_severities | list of critical, high, medium, low | [critical, high] | Findings and plan issues of these severities block approval. A list: it replaces the earlier value |
review_on_gate_failure | boolean | false | Review a round even though a required gate failed |
.agentduo/config.yaml
# Review policy (quality_gates): how strict the loop is. These keys decide when a run is DONE or stops for you;
# they run no commands. Commands to run are under gates.
quality_gates:
blocking_severities: [critical, high, medium] # findings of these severities must be fixed before DONE
stop_on_critical_issue: true # a critical finding stops the run and asks you
review_on_gate_failure: true # the reviewer sees a round whose required gates failed
safety:
pause_before_implement: true # stop with the final plan and wait for your go-ahead
limits:
max_review_rounds: 3How these decide the end of a run: Code review.
gates
A list of commands AgentDuo runs in the workspace, through the shell, after each implementation round (the VERIFY step). Default: none, and the run goes from IMPLEMENT straight to CODE_REVIEW.
| Field | Type | Default | Effect |
|---|---|---|---|
name | string, required | — | The gate’s name in the report and the logs; unique within gates |
command | string, required | — | The command; it passes when it exits with 0 |
required | boolean | true | A failing required gate sends the work back; an optional one is only reported |
timeout_sec | integer ≥ 1 | limits.gate_timeout_sec | Timeout of this gate |
Any other field is an error. gates is a list, so a project’s list replaces the user config’s.
.agentduo/config.yaml
# Command gates: agentduo runs each command in the workspace after every implementation round (the VERIFY step).
# A required gate that fails sends the work back to the implementer; an optional one is only reported.
gates:
- name: tests
command: "npm test"
required: true
timeout_sec: 600
- name: lint
command: "npm run lint"
required: false
limits:
max_consecutive_gate_failures: 3 # this many failing rounds in a row stop the run and ask you
gate_timeout_sec: 900 # for gates without a timeout_sec of their ownNote
gates are commands that run; quality_gates is the review policy, which runs nothing. More in Command gates.
safety
| Key | Type | Default | Effect |
|---|---|---|---|
pause_before_implement | boolean | false | Once the plan is final, the run stops with plan_ready so you can read it before anything is implemented |
claude
| Key | Type | Default | Effect |
|---|---|---|---|
bin | string | claude | The executable: a name looked up on the PATH, or a path |
model | string or null | null | Passed as --model; null lets Claude Code’s own settings decide |
max_budget_usd | number > 0 or null | null | Passed as --max-budget-usd: Claude stops a call that would cost more |
permission_prompts | ask or deny | ask | ask relays Claude’s permission prompts to you when someone can answer; deny never asks, and Claude denies what its settings do not allow |
args | list of strings | [--no-session-persistence] | Flags for every call to Claude. A list: it replaces the default, so list --no-session-persistence again if you keep it |
role_args | mapping of role to list of strings | {} | Flags for one role’s pipeline calls, after args. Merged role by role across files. A conversation call gets only the implementer’s --permission-mode |
The chat’s settings commands write --effort, --allowedTools, --disallowedTools and --add-dir into claude.args, and /mode writes --permission-mode into claude.role_args.implementer.
codex
| Key | Type | Default | Effect |
|---|---|---|---|
bin | string | codex | The executable: a name looked up on the PATH, or a path |
model | string or null | null | Passed as --model; null lets ~/.codex/config.toml decide |
args | list of strings | [--ephemeral] | Flags for every call to Codex. A list: it replaces the default |
role_args | mapping of role to list of strings | {} | Flags for one role’s pipeline calls, after args. Merged role by role across files. Conversation calls do not get them |
/codex model <name> <effort> writes -c model_reasoning_effort=<effort> into codex.args, and /codex permissions writes --sandbox. codex exec is read-only unless told otherwise, so a Codex implementer needs codex.role_args.implementer: [--sandbox, workspace-write] or a sandbox set in Codex’s own config.
paths
| Key | Type | Default | Effect |
|---|---|---|---|
runs_dir | non-empty string | .agentduo/runs | Where runs, conversations and the workspace lock live. Relative to the workspace; ~ is your home folder |
Change it with every AgentDuo closed: the workspace lock lives there. The desktop app shows it but does not edit it. What is in it: Run files.