All documentation pages

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

Top-level keys
KeyWhat it holds
agentsWhich CLI plays each pipeline role
limitsRounds, retries, timeouts and sizes
quality_gatesThe review policy: when a run is DONE or stops for you. It runs nothing
gatesCommands AgentDuo runs after each implementation round (VERIFY)
safetyWhether to stop before implementing
claudeHow Claude Code is called
codexHow Codex is called
pathsWhere 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_args and claude.extra_args, from agentduo v1, are now codex.args and claude.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 true or false: YAML reads yes and no as 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).

agents keys
KeyDefaultRole
agents.plannercodexWrites the plan (PLAN) and signs it off (PLAN_FINALIZE)
agents.plan_reviewerclaudeCritiques the plan (PLAN_REVIEW)
agents.implementerclaudeImplements the plan and fixes findings (IMPLEMENT)
agents.code_reviewercodexReviews 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.

limits keys
KeyTypeDefaultEffect
max_planning_roundsinteger ≥ 14Planning rounds without agreement before the run stops with max_planning_rounds and asks you
max_review_roundsinteger ≥ 15Implementation and review rounds before the run stops with max_review_rounds
max_discussion_roundsinteger ≥ 13/discuss: reviews at most before Codex writes the final answer
max_retriesinteger ≥ 01Extra 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_failuresinteger ≥ 13Rounds in a row with a failing required gate before the run stops with gates_failing
agent_timeout_secinteger ≥ 11800Longest an agent call may take
agent_idle_timeout_secinteger ≥ 0900Stops an agent that prints nothing for this long; 0 turns the check off
gate_timeout_secinteger ≥ 1900Timeout of a gate without a timeout_sec of its own
max_diff_charsinteger ≥ 1120000Characters of the diff the code reviewer gets; a longer diff is cut, and the reviewer is told
max_gate_output_charsinteger ≥ 16000Last 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.

quality_gates keys
KeyTypeDefaultEffect
require_plan_approvalbooleantrueThe planner signs off the plan after the critic approves it (PLAN_FINALIZE). With false, the plan the critic approved is final
require_tests_passbooleantrueA failing required gate keeps the run from DONE and sends the work back
require_codex_approvalbooleantrueThe code reviewer must approve. The name is historical: it applies to whichever agent reviews
stop_on_critical_issuebooleantrueA critical finding stops the run with critical_finding and asks you
blocking_severitieslist 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_failurebooleanfalseReview 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: 3

How 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.

Fields of a gate
FieldTypeDefaultEffect
namestring, required—The gate’s name in the report and the logs; unique within gates
commandstring, required—The command; it passes when it exits with 0
requiredbooleantrueA failing required gate sends the work back; an optional one is only reported
timeout_secinteger ≥ 1limits.gate_timeout_secTimeout 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 own

Note

gates are commands that run; quality_gates is the review policy, which runs nothing. More in Command gates.

safety

safety keys
KeyTypeDefaultEffect
pause_before_implementbooleanfalseOnce the plan is final, the run stops with plan_ready so you can read it before anything is implemented

claude

claude keys
KeyTypeDefaultEffect
binstringclaudeThe executable: a name looked up on the PATH, or a path
modelstring or nullnullPassed as --model; null lets Claude Code’s own settings decide
max_budget_usdnumber > 0 or nullnullPassed as --max-budget-usd: Claude stops a call that would cost more
permission_promptsask or denyaskask relays Claude’s permission prompts to you when someone can answer; deny never asks, and Claude denies what its settings do not allow
argslist 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_argsmapping 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

codex keys
KeyTypeDefaultEffect
binstringcodexThe executable: a name looked up on the PATH, or a path
modelstring or nullnullPassed as --model; null lets ~/.codex/config.toml decide
argslist of strings[--ephemeral]Flags for every call to Codex. A list: it replaces the default
role_argsmapping 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

paths keys
KeyTypeDefaultEffect
runs_dirnon-empty string.agentduo/runsWhere 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.