debateloop is a terminal CLI for running structured model-vs-model debates on top of your local OpenCode setup.
By default, each stage uses a 60000ms timeout.
It runs a fixed debate loop:
- Debater A opening answer
- Debater B opening answer
- Debater A critique of B
- Debater B critique of A
- Debater A revised answer
- Debater B revised answer
- Judge verdict
The result is a winner-first summary plus a saved transcript you can inspect later.
- Node.js
>=20.12.0 - OpenCode installed and working locally
- At least three available models in OpenCode:
- one for Debater A
- one for Debater B
- one for the Judge
npm install -g debateloopnpm install
npm run build
npm linkStart a debate:
debateloop ask "Why is TypeScript better than JavaScript?"Override the models for one run:
debateloop ask "Which is better: microservices or a monolith?" \
--debater-a github-copilot/claude-sonnet-4.6 \
--debater-b github-copilot/gpt-5.4 \
--judge github-copilot/claude-haiku-4.5Show every model output as each stage completes:
debateloop ask "When does clean code make a codebase worse?" --debugOverride the stage timeout for one run:
debateloop ask "Should we rewrite this service?" --stage-timeout-ms 90000Inspect a saved transcript:
debateloop inspect <run-id>On the first run, debateloop asks you to choose:
- Debater A model
- Debater B model
- Judge model
It saves this config under:
~/.config/debateloop/config.json
Saved transcripts live under:
~/.config/debateloop/runs/
The saved config also contains reliability settings, including the default stage timeout. A CLI override such as --stage-timeout-ms 90000 applies only to the current run and does not rewrite your saved config.
If you already had an older config file, it keeps your previously saved timeout instead of silently switching to a new default. To make the saved timeout permanent, edit:
~/.config/debateloop/config.json
and update:
{
"reliability": {
"stageTimeoutMs": 60000
}
}If you want to reset the local configuration completely and re-run guided setup on the next command:
rm ~/.config/debateloop/config.json- opening answers are generated independently before critique begins
- retries are applied conservatively for transient stage failures
- judge output is validated as structured JSON
- partial transcripts are preserved when a run fails
inspectshows prompts, outputs, attempts, durations, and stage errors
Install dependencies:
npm installRun the CLI in dev mode:
npm run dev -- ask "Should tests come first?"Run tests:
npm testBuild:
npm run builddebateloopdepends on your local OpenCode configuration and available providers/models- different judge models may produce longer or more verbose verdicts; transcripts preserve the raw output for inspection
- this project is optimized for structured comparison and tradeoff analysis, not open-ended agentic planning