Multi-day agents need checkpoints, not bigger context windows
The new Anthropic models can run for days. DeepMind's latest can maintain state across hours. OpenAI's next release promises "persistent reasoning sessions." Everyone's building for the multi-day agent era, but most of our architectures are still designed for 30-second conversations.
I learned this the hard way when our content agent ran for 16 hours straight, burned through $200 in API calls, and produced a 40,000-word document that repeated the same three points in slightly different ways. It never stopped because it never knew when to stop.
Here's what I've learned about building agents that can actually survive long-horizon tasks:
Checkpoint everything, not just the final state. Your agent needs to save progress every 15 minutes, not just when it finishes. When it crashes 6 hours in, you want to resume from hour 5.5, not hour zero.
# Every 15 minutes, save:
{
"task_id": "content-research-2024-001",
"elapsed_hours": 3.2,
"progress_markers": ["research_complete", "outline_drafted"],
"next_action": "write_section_2",
"context_snapshot": "...",
"cost_so_far": 47.32
}Build cost circuit breakers before you need them. Set hard limits: $50 per task, 12 hours max runtime, 100 API calls per hour. When you hit a limit, the agent should gracefully pause and ask for permission to continue.
State persistence needs to be dumber than you think. Don't try to serialize complex objects or maintain perfect context. Save the essentials: what's done, what's next, what went wrong. Your agent should be able to cold-start from any checkpoint and pick up where it left off.
# Simple state that survives crashes
state = {
"completed_steps": ["step1", "step2"],
"current_step": "step3",
"failures": [{"step": "step2", "retry_count": 2}],
"resources": ["file1.txt", "api_response.json"]
}Error recovery needs retry budgets, not infinite loops. Give each sub-task 3 attempts max. After that, escalate to a human or mark it as blocked. I've seen agents spend 8 hours trying to fix a single API call that was never going to work.
Long-running agents need heartbeats. Every hour, your agent should report what it's doing and ask if it should continue. Not for permission—for course correction. "I'm 4 hours into research and found 47 sources. Continue for 2 more hours or switch to writing?"
The biggest mindset shift: stop thinking about agents as request-response systems. Think about them as background processes that need monitoring, resource management, and graceful degradation.
Multi-day agents aren't just longer conversations. They're a completely different architecture challenge. The agents that survive this transition will be the ones built like production systems, not chat demos.