How do I run the critique loop in Claude Code?
7 min read · Updated
The critique loop is three moves: the agent writes a draft, Vindex checks it against your rules, and the agent fixes what failed and checks again. Claude Code can run it today, with no new framework.
1. Connect Claude Code
Add the Vindex MCP server with one command and sign in once from your browser. The Claude Code connect page has the command and the sign-in step.
2. Check it can read your rules
List my Vindex rule sets.Claude Code calls list_rulesets and shows what it finds. Reading rules is free. If the list is empty, write a rule first.
3. Run one draft through the loop
Write the reply to this customer email. Before you show it to me, check it
with Vindex against the "Support email standards" rule set. If a rule fails,
rewrite only the passage Vindex quotes and check again. Stop when every rule
passes or Vindex says you have reached the attempt limit, and tell me which
rule is still failing.Claude Code calls validate with the whole draft. If a rule fails, the result quotes the passage that broke it, and Claude Code rewrites that passage and calls again in the same session. Each attempt is a critique and uses a credit. A new account includes 100 free critique credits, once.
4. Make it automatic
Put the loop in CLAUDE.md so Claude Code does it without being asked. The standing instructions guide has the text.
Helpful extras
- Ask Claude Code to send
agent_modelwith each call. Reports group by it, so you can compare models later. - Use one
session_idfor a whole task, so attempts are counted together. - Pass
max_attemptsto lower the cap for a task. It can never raise it. - Send
output_ref, such as a ticket ID, so you can match a result to the output later.
When it stops
The loop ends at a pass, at the attempt cap, or when credits run out. At the cap, Claude Code should stop, show you the last draft, and tell you which rule it could not pass. You then edit the draft, or change the rule. A call over the cap is refused and costs nothing.
Give every agent the same rules.
Write a rule, connect your agent, and run a critique in a few minutes. A new account includes 100 free critique credits.
