Architect a Claude Agentic Loop with Safe Termination
Build a single-agent support resolver on Claude's tool-use loop with explicit termination conditions, an escalation boundary that hands risky actions to a human, and graceful failure handling so it can never loop forever. Submit a single script or notebook for instant, rubric-based feedback.
3 hrs
Est. time
4
Outcomes
6
Rubric criteria
65%
Pass score
What you'll learn
Skills you'll have real reps in after shipping this.
See how it works
The agentic loop
Claude alternates between reasoning and tool calls. Each turn you read stop_reason and decide whether to run a tool and continue, or stop.
Why a step budget matters
Without a hard iteration cap an agent can loop indefinitely on a hard ticket. A budget plus a completion signal guarantees the loop ends.
The scenario
You are adding an autonomous support agent to a SaaS product. It reads a customer ticket, calls tools to look up the account and order, and either resolves the issue or drafts a reply. Leadership loves the demo, but two things make them nervous: an agent that keeps calling tools in a loop with no stop condition, and an agent that issues a refund it was never authorized to make.
Your job is to architect the loop properly. It must know when it is done, refuse to take high-risk actions on its own, and fail safe when a tool errors out instead of spinning.
Your role
You are a Claude solutions architect. Your deliverable is one well-structured agent module a teammate could trust in production: a correct tool-use loop, hard termination guarantees, a clear autonomous-vs-human boundary, and failure handling, all demonstrated end to end.
Start the task to unlock the full brief
You'll get the step-by-step requirements, setup commands, the 6-criterion grading rubric, tips, and the ability to submit your solution for instant AI grading.
Free to start · submit when you're ready
Learning resources
What you'll build in this Claude agentic-loop task
This is a build-and-submit task, not a guided lab. You architect a single Claude agent the way it has to run in production: a real tool-use loop that reads stop_reason and feeds tool_result blocks back, with hard termination guarantees and an escalation boundary that keeps high-risk actions out of the agent's hands. The deliverable is one Python file you could drop into a real service.
The focus is the part most demos skip: control. You enforce a maximum-iteration cap and a completion signal so the loop cannot spin, you decide in code which actions are autonomous and which require a human, and you make tool failures fail safe instead of triggering an infinite retry. You then prove it on three tickets, including an escalation and a failure case.
Grading is rubric-based and explainable. Your submission is scored against weighted criteria (SDK integration, loop correctness, termination, escalation, failure handling, and the demonstration) and returns per-criterion feedback with evidence quoted from your code. The pass threshold is 65 percent and you can resubmit. These are the agentic-architecture skills the Claude Certified Architect exam tests.