Automation
Claude Code scheduled agents and dynamic workflows explained
On this page
- Three names, three different things
- What actually shipped, and when
- How dynamic workflows actually work
- The failure modes that matter more once nothing is watching
- Pricing reality
- What a well-built pipeline looks like
- Who should build one now vs. who should use n8n
- Bottom line
- Frequently asked questions
Anthropic shipped three overlapping automation features inside seven weeks this year, and developers already lump all of it together as “Claude Code scheduled agents.” That’s not quite right. Dynamic workflows, Claude Code Routines, and scheduled deployments all let Claude run with less hand-holding, but they solve different problems and picking the wrong one wastes real time. Here’s what each one actually does, what it costs, and how a real hands-off pipeline uses them together.
Three names, three different things
Start with the confusion, because it’s the whole reason this article exists.
Dynamic workflows live inside Claude Code. Ask Claude to build a workflow, or type the trigger word “ultracode,” and Claude writes its own JavaScript orchestration script that spawns and coordinates subagents to work one complex task. When the task finishes, the workflow is done. It’s a harness generator for a hard job, not a standing service.
Claude Code Routines also live in Claude Code, but solve a different problem: recurring, repo-bound work. Configure a prompt, a repository, and connectors once, then trigger runs on a fixed cadence, from an API call, or off a GitHub event. The code runs on Anthropic’s cloud, so your laptop can be closed. Routines opened in research preview on April 14, 2026.
Scheduled deployments are a Claude Platform primitive, not a Claude Code feature at all. They attach a cron schedule to any Managed Agent, coding or not, and each time the schedule fires the agent starts a fresh session and completes its task. No scheduler to host, no cron job to babysit. This shipped in public beta on June 9, 2026, alongside vault-stored environment variables so agents can hold credentials securely between runs.
The practical rule: dynamic workflows for a hard one-off task, Routines if the recurring job is tied to a specific code repo, scheduled deployments if you want any agent running on a timer independent of a repo. Still deciding whether Claude Code is even the right assistant for your team? Our best AI coding assistants comparison covers where it stands against Cursor and Copilot before you build anything on top of it.
What actually shipped, and when
The order matters because it shows how fast this moved. Routines opened in research preview April 14. Dynamic workflows shipped in Claude Code on June 2, announced by Thariq Shihipar and Sid Bidasaria of the Claude Code team. Scheduled deployments and vault credentials followed a week later on June 9, in public beta under the managed-agents-2026-04-01 beta header. All three are live and usable right now, and all three are still officially preview or beta, which matters more than it sounds like once you’re trusting one to publish something without a human in the loop.
How dynamic workflows actually work
A dynamic workflow is a JavaScript file with a small set of functions for spawning and coordinating subagents, plus the standard JS globals like JSON, Math, and Array for processing data along the way. Claude decides which model each subagent uses and whether it runs in its own worktree, so it can dial up intelligence or isolation only where the task needs it. If you interrupt a workflow, resuming the session picks up where it left off instead of starting over.
Anthropic documents a handful of patterns that show up constantly once you start using these:
- Classify-and-act routes a task to different agents or behavior based on what type of task it is.
- Fan-out-and-synthesize splits a big job into many small steps, runs an agent per step, then merges the structured results.
- Adversarial verification pairs every worker agent with a separate agent whose only job is to check its output against a rubric.
- Generate-and-filter produces a batch of candidates, then filters, dedupes, and keeps only the ones that survive verification.
- Tournament has multiple agents attempt the same task differently, then a judge agent picks a winner through pairwise comparison.
- Loop-until-done keeps spawning agents until a stop condition is met, useful when you don’t know the size of the job upfront.
Anthropic’s own example of a workflow at scale: Bun was rewritten from Zig to Rust using this pattern, breaking the migration into callsites and modules, fixing each in an isolated worktree, then having a separate agent adversarially review and merge the results.
One honest caveat straight from Anthropic: dynamic workflows burn more tokens than the default harness. They’re built for complex, high-value tasks, not for a routine bug fix. Asking yourself “does this really need more compute” before reaching for ultracode will save you money most days.
The failure modes that matter more once nothing is watching
Anthropic names three specific ways long single-context agent runs go wrong, and every one of them gets worse the moment you’re not sitting there watching the terminal.
Agentic laziness is Claude declaring a big multi-part job done after partial progress, like fixing 35 of 50 flagged items in a security review and calling it finished. Self-preferential bias is Claude favoring its own output when it’s the one being asked to judge or verify it, which is exactly the setup an unattended pipeline creates if you let the same context grade its own work. Goal drift is the slow loss of fidelity to the original ask across many turns, especially after context compaction, where edge-case requirements and “don’t do X” constraints quietly disappear.
Dynamic workflows exist specifically to defend against these by giving each subagent its own clean context and a narrow goal, but a scheduled pipeline needs the same defense at the process level: explicit status headers between steps, a dedicated verification step that isn’t run by the same agent that did the work, and a hard stop on failure instead of pushing forward with bad data.
Pricing reality
None of this is free, and none of it is priced the way the announcement blog posts imply. Here’s what it actually costs as of July 2026, verified directly from claude.com/pricing.
Claude Pro runs $17/month billed annually or $20/month billed monthly, and it includes Claude Code. Max starts at $100/month for 5x the usage of Pro, with a 20x tier reported consistently at $200/month. Team plans need Premium seats for Claude Code access, at $100/seat/month billed annually ($125/month monthly), five-seat minimum.
The number nobody quotes is the Managed Agents runtime charge for scheduled deployments: $0.08 per session-hour of active runtime, on top of standard model token rates. Model pricing itself: Opus 4.8 runs $5 per million input tokens and $25 per million output tokens. Sonnet 5 is $2/$10 through an introductory window ending August 31, 2026, then $3/$15 standard, and the tokenizer change behind that pricing is worth understanding before that window closes. Haiku 4.5 is $1/$5. If a scheduled agent adds web search to its toolkit, that’s another $10 per 1,000 searches on top of the tokens spent processing what comes back.
For a lightweight daily job, a short research-and-summarize task running a few minutes a day, the runtime charge alone lands in the range of a few cents daily. Token cost depends entirely on how much the agent reads and writes, which is the number worth watching, not the per-hour fee.
What a well-built pipeline looks like
A scheduled agent chaining research, writing, review, and publishing sounds simple until you build one. The failure modes above show up fast once nothing is watching: a lazy agent that calls a half-finished job done, a review step that rubber-stamps its own work, a task that quietly drifts from what was actually asked. Guarding against that takes real structure, not just a cron schedule.
The pattern that holds up: every step writes an explicit status for the next step to read instead of relying on shared context. A review step runs in a separate context from whatever produced the work, so it isn’t grading its own output. And a failed or blocked step hard-stops the chain and logs the reason instead of pushing forward with bad data. Those three things directly answer goal drift, self-preferential bias, and agentic laziness, in that order.
None of the three Anthropic features described above force you to build a pipeline this careful. They’ll happily let you skip the review step and publish straight through. Whether that’s a good idea depends entirely on what the far end of the pipeline can do, and how bad it is if it’s wrong once.
Who should build one now vs. who should use n8n
If the recurring job is code-shaped, tied to a specific repo, and benefits from Claude actually reading and editing files, Routines or a scheduled deployment running Claude Code is worth setting up now. Weekly dependency audits, nightly test-flake investigations, and a standing research-and-draft pipeline all fit that shape well.
If the job is mostly moving data between existing tools, Slack to a spreadsheet, a form to a CRM, a webhook to an email, n8n remains the more practical choice today. It has a visual builder, hundreds of pre-built connectors, and none of the token-cost unpredictability that comes with routing every step through a language model. The Developer Automation Blueprint covers twelve of those exact workflow shapes for developers who want automation without paying LLM rates for tasks that don’t need judgment, just plumbing.
The honest split: use Claude’s scheduled features when the job genuinely needs reasoning, code understanding, or judgment calls at each step. Use n8n when it needs reliable plumbing more than it needs a brain.
Bottom line
Dynamic workflows, Routines, and scheduled deployments solve three different problems that happen to share a vendor and a launch quarter. Dynamic workflows handle one hard task right now. Routines handle recurring work tied to a repo. Scheduled deployments handle any agent on a timer. All three are priced through standard token rates plus a small runtime fee, none of them are expensive to try, and all three are new enough that a human approval gate belongs in any pipeline built on top of them until they’ve proven themselves over a few months of real runs.
Frequently asked questions
What’s the difference between Claude Code dynamic workflows and scheduled deployments?
Dynamic workflows are a Claude Code feature: Claude writes a JavaScript orchestration file on the fly and spawns subagents to work a single complex task, then it’s done. Scheduled deployments are a Claude Platform Managed Agents feature: you attach a cron schedule to an agent and it runs on its own, indefinitely, starting a fresh session every time the schedule fires. One is for a hard task right now, the other is for a recurring job forever.
What does ultracode do in Claude Code?
Typing ultracode in a prompt forces Claude Code to build a dynamic workflow instead of handling the task in its default single-context harness. It’s a real, documented trigger word, not a hidden feature. You can also just ask Claude to build a workflow in plain language and get the same result.
How much does it cost to run a scheduled Claude agent?
There’s no separate scheduling fee. You pay standard model token rates (Opus 4.8 is $5/$25 per million input/output tokens, Sonnet 5 is $2/$10 through August 2026) plus $0.08 per session-hour of active managed agent runtime. A short daily job that runs for a few minutes costs a few cents a day in runtime on top of whatever tokens it burns.
Can Claude Code run completely unattended on a schedule?
Yes, through two different paths. Claude Code Routines let you configure a prompt, repo, and connectors once and trigger runs on a cadence, an API call, or a GitHub event, running on Anthropic’s cloud instead of your laptop. Claude Platform scheduled deployments do the same thing for any managed agent, not just coding tasks. Both are still in preview or beta, so build in a human approval gate for anything that publishes or ships.
Share
Grant M.
Developer with IBM i and full-stack experience. Covers AI tools and automation for software developers at PromptedDev, with a focus on real workflows, honest comparisons, and legacy system modernization.