"I Tested 3 Ways to Deploy Claude Agents (Here's When to Use Each)" - @Nate Herk
Structural-bias note: author runs AI Automation Society (700k YouTube) and discusses Modal / Trigger.dev as cloud-deployment options. No explicit sponsor block, but the piece functions as a survey-with-rubric that flatters all three vendors as fit-for-purpose. Read as a framework, not a buying recommendation.
Why this is in the vault
Direct meta-architecture for the RDCO autonomous-agent stack. The piece names and rubric-orders four deployment shapes (Claude Code /loop, Claude Routines, Modal/Trigger.dev, Agent SDK) on two axes (where it runs, how agentic), and surfaces the May 13 2026 Anthropic announcement that subscription credits now flow to Agent SDK - the cost question that previously blocked Method 3 + agent for us. This is the first survey-style framing of our entire deployment surface I've seen written down by someone outside our context, and it maps cleanly onto what we're already running.
The core argument
Two axes determine deployment shape: (1) where the agent runs - your machine vs someone's cloud - and (2) how agentic it is - full autonomous reasoning loop vs deterministic script. From these axes, four methods:
- Method 1 - Claude Code /loop: zero-setup cron inside Claude Code session. Full Workflow / Agent / Tools (WAT). Catches: machine stays on, session stays open, terminal loops expire 7d (desktop 3d), up to 30min jitter. Terminal
/cleardoes NOT kill the cron; desktop/cleardoes. Two-loop trick: a second /loop firing /clear every 5 min keeps context healthy. - Method 2 - Claude Routines: Anthropic-cloud-hosted scheduled agents. Capped by plan (Pro 5, Max 15, Team/Ent 25 per day). 1 hour minimum interval. Routines can fire from API endpoint or GitHub webhook. Local "Scheduled Tasks" variant plays catch-up after machine-off.
- Method 3 - Modal / Trigger.dev: real serverless infra with dashboards, webhooks, machine-can-be-off. LOSES the agent (unless you wire in Agent SDK) and LOSES the Claude Code subscription - AI calls become per-token API spend. Many deployments don't need AI at all.
- Claude Agent SDK: wraps the Claude Code harness as an SDK. Stateless by default (pass session_id for continuity). Inherits subagents, MCPs, hooks, skills, slash commands, claude.md, memory, compaction. Per-token API costs, BUT (May 13 2026 announcement) Max subscription credits now apply to Agent SDK as a separate dedicated budget from Claude Code weekly.
- Hooks: event-driven deterministic glue (pre-tool-use, post-tool-use, session-start/end, on-every-message) layered on top of agentic flows.
Decision rubric:
- Live work + full agent loop -> /loop
- Wake on schedule, work while you sleep -> Claude Routine
- Deterministic script, no AI reasoning needed -> Modal / Trigger.dev
- Agent reasoning in your own infra -> Agent SDK on Modal / Trigger.dev
Punchline: "Match the method to the job."
Mapping against Ray Data Co
RDCO IS Method 1, hardened. Our entire autonomous-loop stack (vault-health, process-inbox, check-board, process-newsletter watch, morning-prep, finance-pulse, self-review, improve, graph-reingest, curiosity, deep-research, sync-contacts, process-youtube watch - 13 active crons) runs as Claude Code /loop jobs inside tmux on the Mac Mini, with a LaunchAgent supervising and a daily 4am session restart. That's production-shaped Method 1. Nate's framing validates the architecture; it does NOT suggest a migration.
Two-loop /clear trick is a finer-grained context-hygiene option we don't currently use. Our context hygiene is coarse: tmux + daily 4am restart. Nate's pattern (one /loop fires the work, a second /loop fires /clear every 5 min) would give per-cycle context resets without restarting the session. Worth piloting on one cron - probably /process-newsletter watch since it ingests the largest artifacts - to measure context-drift improvement before the next compaction. Queued for /improve review when bandwidth opens, NOT a today-decision.
Method 2 (Claude Routines) is not for us. 15/day cap on Max would not fit our 13-loop stack, and we'd lose local filesystem access (vault writes, audit scripts, qmd index, /tmp caches, attachment reads) that ~half our skills depend on. Don't migrate.
Method 3 candidates exist. Several cron loops don't need agent reasoning to fire - /sync-contacts (Gmail + Calendar query into ledger write), /graph-reingest (Python script + qmd), and the deterministic audit-script post-condition checks could migrate to Modal or Trigger.dev as straight scripts and free up Claude Code session slots. Future-architecture question, NOT today. Queued for /improve review when bandwidth opens.
Agent SDK is the long-term Method 3 + agent shape. The May 13 announcement that subscription credits flow to Agent SDK is the cost unlock that previously blocked this path. Worth a deeper read when we hit the next "RDCO infrastructure agent runs without a Mac Mini" question. Not relevant until then.
Hooks - we use them lightly. Yesterday's IndyDevDan agentic-security piece flagged a global pre-tool-use bash hook for RDCO settings.json as a gap; that aligns directly with Nate's "deterministic glue on top of agentic flows" framing. Already queued.
Queue for /improve review (low-cost experiments, no founder decision needed today):
- Pilot two-loop /clear trick on /process-newsletter watch
- Audit which existing /loop crons could migrate to deterministic Modal / Trigger.dev jobs
Related
- [[project_channels_agent_setup]] - our hardened Method 1 stack on the Mac Mini
- [[01-projects/skill-pipelines/2026-05-12-multi-agent-pipeline-architecture]] - in-flight pipeline architecture work
- [[06-reference/2026-04-04-anthropic-skills-internally]] - Anthropic's internal skills practice
- [[06-reference/2026-05-11-indy-dev-dan-delete-bash-tool-agentic-security]] - hooks as deterministic glue
- [[06-reference/2026-05-14-treybig-how-agents-use-systems-differently]] - companion piece on agent-system fit
- [[06-reference/concepts/2026-05-14-four-tier-buy-build-stack-soloproneur-tam-filter]] - BUY/BUILD framework these deployment methods slot into
- [[06-reference/2026-04-27-indy-dev-dan-maximize-claude-code-subscription]] - subscription-economics context for Method 1 vs Method 3
- [[06-reference/2026-04-20-indy-dev-dan-mac-mini-agents-openclaw-nightmare-skills-instead]] - origin of our Mac Mini agent choice