
Tell Claude What Done Looks Like: Add a Grader Agent to Your Pipeline With Managed Agents Outcomes
Chris Harper
2 min read
Jul 11, 2026 · 20:05 UTC
Claude Managed Agents Outcomes wires a rubric-graded iterate→grade→revise loop into your pipeline — define success once, and the harness iterates until the output passes.
Most agentic pipelines have a single-shot weakness: the agent runs once, produces output, and you either accept it or retry manually. Anthropic's Managed Agents platform has a better pattern — Outcomes — where you attach a grading rubric to a session and a separate grader agent iterates with the worker until the artifact passes, the iteration cap hits, or you interrupt.
How it works
Send a user.define_outcome event after creating a session:
from anthropic import Anthropic
client = Anthropic()
# Session already created (agent + environment set up separately)
session = client.beta.sessions.create(
agent=agent.id,
environment_id=env.id,
title="Monthly sales report",
)
RUBRIC = """
## Report Rubric
- Contains an executive summary 150 words or fewer
- All figures sourced from the attached CSV (no invented numbers)
- Includes a year-over-year comparison table
- Output is a single .md file
"""
# Wire the grader — agent starts working immediately on receipt
client.beta.sessions.events.send(
session_id=session.id,
events=[{
"type": "user.define_outcome",
"description": "Generate monthly sales report from attached CSV",
"rubric": {"type": "text", "content": RUBRIC},
"max_iterations": 4, # default 3, max 20
}],
)
No additional user message is required — the agent starts working as soon as it receives the user.define_outcome event.
Reading evaluation results
Poll or stream span.outcome_evaluation_end events:
session = client.beta.sessions.retrieve(session.id)
for ev in session.outcome_evaluations:
print(ev.result) # "satisfied" | "needs_revision" | "max_iterations_reached"
print(ev.explanation) # "All 4 criteria met: summary is 142 words, table present..."
The grader runs in a separate context window — it evaluates the output against your rubric cold, without seeing the agent's reasoning. Failures come back as needs_revision with an explanation that feeds directly into the next iteration. The session retains full history, so you can chain a second outcome or continue conversationally after the first one completes.
When to use it
Outcomes work best when "done" is measurable: all tests pass, specific fields are populated, format constraints are met. Anthropic's internal benchmarks showed +8.4% on Word document generation and +10.1% on PowerPoints from simply attaching a rubric. Write specific criteria — "all public functions have type annotations, no bare except clauses" beats "clean code" every time.
Sources: Define outcomes — Claude Platform Docs, Cookbook: verify with outcome grader