Flashcardsfor IT Certifications

D1: Custom Agent Loops, Harnesses & Hosting

Claude Certified Developer – Foundations exam practice questions · 10 flashcards

Question
What is an agent loop?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Custom Agent Loops, Harnesses & Hosting practice questions and answers
  1. What is an agent loop?
    Repeatedly: call Claude, execute any tool_use requests, return tool_results, and stop when Claude ends its turn.
  2. What stop_reason signals the loop should run a tool?
    tool_use.
  3. What signals the agent loop is finished?
    stop_reason end_turn (or a limit such as max turns or budget being reached).
  4. What is an agent harness?
    The code around the model that runs the loop, dispatches tools, manages context and permissions, and enforces limits.
  5. Why add a maximum iteration limit to a custom loop?
    To prevent runaway loops and unbounded token cost.
  6. Self-hosted vs Anthropic-hosted agents?
    Self-hosted: you run the harness in your own infrastructure with full control. Anthropic-hosted (managed): Anthropic runs the agent infrastructure for you.
  7. Why choose self-hosting?
    Control over network access, data location, custom tooling and compliance requirements.
  8. Why choose an Anthropic-hosted (managed) agent?
    Less infrastructure to build and operate; faster to ship.
  9. What are hooks used for in agents?
    Running deterministic code at fixed points (e.g. before a tool runs) to enforce rules regardless of what the model decides.
  10. Why use a hook instead of a prompt instruction for a hard rule?
    Prompts are probabilistic; hooks run every time, so the rule is guaranteed.