Long-Running Agents

Why Agents Fail at Long Tasks

Building a complete web app with an Agent sounds simple, but in practice it's riddled with handoff failures and context fragmentation.

Problem Background
High-Level Prompt Given to the Agent
"Build a clone of claude.ai"

This is no small task. A full chat app requires an authentication system, conversation management, streaming output, file uploads, Markdown rendering, multi-turn history… easily 200+ independent features. What goes wrong when you ask an Agent to build something like this from scratch?

Failure Modes
One-Shotting: Trying to Do Too Much at Once
The most common failure mode

The Agent tries to complete all features in a single session, resulting in:

  • The context window gets exhausted halfway through implementation
  • The next Agent inherits half-finished code and can only guess what the previous one did
  • Vast amounts of time are wasted just getting basic functionality working again, leaving no time for new features
  • Even Compaction (context compression) isn't enough — compressed instructions are too vague and the new Agent still gets lost
Typical Timeline of One-Shotting
Agent 1 starts
50% of features done
Context exhausted
Agent 2 takes over
Time spent fixing incomplete work
Context exhausted again
Each handoff is spent fixing, and progress stalls completely
Premature Completion: Declaring Done Too Early
The Agent thinks it's "good enough"

The Agent sees that some features are implemented and assumes the project is basically complete:

  • Declares the project complete when in reality only 30% of core features are done
  • No task checklist means the Agent doesn't know what's still missing
  • No verification mechanism — thinks it's done but no end-to-end tests to prove it
Live Demo: Watch an Agent Break Down
Context Window
0%
Analogy: The Engineer Who Forgets Everything on Every Shift
Imagine a Software Project
Every engineer works only one shift. At handoff, they suffer complete amnesia: no idea what the previous person did, why, or what comes next. Each person sits down to a pile of half-finished code and has to understand everything from scratch. This is exactly the state of a long-running Agent without a handoff mechanism.
Core Insight
The core challenge of long tasks is the handoff — the actual execution isn't the hard part. Agents don't lack capability; they lack a mechanism for maintaining continuity across context breaks. Solving the handoff problem is the key to solving the long-running problem.