CLAUDE CODE AGENTS: ADVANCED ORCHESTRATION - Chapter 4, Exercise 2 Dynamic Pacing vs. a Fixed Schedule ==================================================================================== QUESTION: Explain the difference between dynamic pacing and a fixed schedule for a looping agent, and describe a scenario where a fixed schedule would actually be the wrong fit. SOLUTION / EXPLANATION: With dynamic pacing, the agent itself decides how long to wait before its next cycle, based on what it's actually waiting on at that moment - the same polling-vs-heartbeat judgment this chapter describes for a single wake-up, but applied repeatedly across an ongoing loop, re-evaluated each time. With a fixed schedule, the same interval is used every single cycle regardless of what's actually happening - a constant, unchanging rhythm that doesn't adapt to the real situation. A scenario where a fixed schedule would be the wrong fit: an agent looping to check on a series of tasks with wildly varying, unpredictable durations - some finishing in under a minute, others taking over an hour, depending on factors the agent can't know in advance. A fixed schedule set to, say, check every five minutes would work reasonably well for the hour-long tasks, but would be far too infrequent for the under-a-minute tasks (adding needless delay before noticing they're actually done), while also being too frequent relative to genuinely long-running tasks in the early part of their run, where nothing meaningful has changed yet. A fixed interval simply cannot fit both situations well at once, because it doesn't adapt. Dynamic pacing handles this correctly by adjusting each cycle based on the specific task actually being checked - a short expected duration gets a short next-check delay, a long one gets a longer one - rather than forcing every situation through the same unchanging rhythm a fixed schedule imposes regardless of fit. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It states the core mechanical difference (agent adapts each cycle vs. a constant unchanging interval) and grounds the "wrong fit" half of the question in a concrete scenario (widely varying task durations) where a single fixed interval structurally cannot serve every case well, unlike dynamic pacing which adjusts to each one.