IronStack
trident-loop · Open source · MIT

A second AI reviews the plan
before your coding agent writes code

trident-loop is an open-source skill for coding-agent CLIs. You write a plan with the agent you already use, a different provider reviews it and has to back each finding with evidence, a builder you choose implements it, and a fresh session of another provider inspects the final diff.

Why a different provider

Whoever wrote the plan should not approve it

Each model family has its own blind spots, and a review only counts when the reviewer could not have written the plan itself, so the reviewer always comes from another provider. Every run records who planned, reviewed, built and inspected, which model was requested and which one actually answered, and the evidence behind each finding.

  1. 1

    Plan

    The host agent scouts the code and context, settles the material decisions with you and writes the plan with acceptance checks.

  2. 2

    Review

    Another provider reviews the plan. The host arbitrates each finding and resends until approval, which is bound to the plan's SHA256.

  3. 3

    Build

    The authorized builder implements the plan and the host runs the proof checks.

  4. 4

    Inspect

    A fresh session of a provider other than the builder inspects the final code, and you get the diff and any remaining findings.

Providers

Six CLIs, any of them in any role

The default role order is claude, codex, kimi, deepseek, qwen, opencode. The reviewer is the first provider that is not the host, and you can override any role; the log records each change.

ProviderCLILive verification
Claude CodeclaudeLive-tested (upstream baseline)
CodexcodexLive-tested (upstream baseline)
Kimi CodekimiCLI verified; review not live-tested
DeepSeek HarnessdshNot live-tested
qwen-codeqwenNot live-tested
OpenCodeopencodeCLI verified; review not live-tested
Install

Install it in the CLI you already use

Claude Code, through the plugin marketplace
/plugin marketplace add RogerioTrani/trident-loop
/plugin install trident-loop@trident-loop
Codex and other hosts, with the installer
git clone https://github.com/RogerioTrani/trident-loop.git
python trident-loop/install.py --host codex

Every provider you delegate to must be installed and signed in. trident-loop never calls a hosted API and never reads keys; the runner needs Python 3.10 or newer and has no pip dependencies. Instructions for Kimi, qwen-code, DeepSeek and OpenCode are in the README.

Security

Review and inspection are read-only. In build mode the builder edits files and runs commands without asking each time, inside its CLI's own boundary, and Qwen has no filesystem sandbox. Build in a repository you can reset, with no production credentials in the environment.

Full trust model (SECURITY.md)
FAQ

trident-loop in a few answers

Version 0.10.0 · Updated November 13, 2026

How do I get a second AI to review my Claude Code or Codex plan?

Install trident-loop in the CLI you plan with, install and sign in to at least one other supported CLI, and ask for "trident this feature" or "trident this plan". The first provider in the pipeline that is not your host reviews the plan, so a plan written in Claude Code goes to Codex by default. Pass reviewer= to pick another one.

How many CLIs do I need?

Two. The reviewer must be a different provider from the host, and the inspector must be a different provider from the builder. With only Claude Code and Codex installed, for example, Claude plans and builds while Codex reviews and inspects.

Does it call any API or need API keys?

No. The runner starts the CLIs you already have installed and each one uses its own sign-in. trident-loop never reads or stores keys. Every review, build and inspection runs on your accounts, so it spends the quota or credits of each provider you delegate to.

Can I use it on a plan I already wrote?

Yes. mode=review loads your plan, asks only about material gaps and goes straight to review, for example: trident this plan, mode=review, plan=docs/migration.md.

How is trident-loop different from claudex-loop?

claudex-loop, by Chase AI, runs the same plan, review, build and inspect loop with two providers, Claude and Codex. trident-loop keeps that loop and adds a provider registry with a permission boundary per CLI, so Kimi Code, DeepSeek Harness, qwen-code and OpenCode can also plan, review, build or inspect.

Is build mode safe?

Review and inspection are read-only. Build mode lets the builder edit files and run commands without asking each time, inside whatever boundary its CLI offers, and Qwen has no filesystem sandbox at all. Build in a repository you can reset, with no production credentials in the environment.

Which providers have been tested against the real CLI?

Claude Code and Codex were live-tested in the upstream baseline. For Kimi Code and OpenCode the CLI surface was checked against the installed binary, but no full review has run yet. DeepSeek Harness and qwen-code have not been live-tested. The automated tests cover all six with fake CLIs.

Adapted from claudex-loop by Chase AI (MIT). A project by Rogério Trani, published by IronStack. Versão em português