Part 4 · Engineering Patterns for Reliable Agents

Why Agents Can't Handle Long Tasks

Trying to do too much at once, or quitting after one round — two classic failure modes

THE QUESTION THIS PAGE ANSWERS

ANSWER FIRST

Why Agents Can't Handle Long Tasks?

Trying to do too much at once, or quitting after one round — two classic failure modes

DECISION RULE

Make the claim earn its place. Use this page as a decision aid, not a definition to memorize. Connect the idea to one real task, one observable result, and one failure that would change your mind.

TRY NEXT

Write one question you could answer with evidence after trying this idea.

WATCH FOR

A conclusion that sounds complete but leaves the key assumption untested.

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.

Why “Problem Background” depends on the operation

“This is no small task.” makes the structure concrete. The useful comparison is not which name sounds more advanced, but how the data is arranged and how far the most common operation has to travel.

Read a structure through access and change

“The Agent tries to complete all features in a single session, resulting in” exposes a trade-off that is easy to miss: reading by position, looking up by key, adding at either end, inserting in the middle, and traversing relationships do not favor the same organization. A structure that is fast for one operation is not automatically fast for all of them.

  • 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

Count scale and update frequency together

Use “The Agent sees that some features are implemented and assumes the project is basically complete” as a boundary check. Write down the data size, the dominant operation, and the latency you can accept before deciding whether an AI-generated structure actually fits.

From “Problem Background” to “Failure Modes”

“Problem Background” grounds the problem in “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…”. “Failure Modes” then moves it toward “The Agent tries to complete all features in a single session, resulting in”. Together, they show that the lesson is not just a conclusion to remember, but a claim with conditions.

Carry the judgment into the next situation

When you meet a new data structure, do not begin by memorizing its definition. Write down the most frequent operation, estimate scale and update behavior, and check whether the structure satisfies all three conditions.

  • “Problem Background”: 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…
  • “Failure Modes”: The Agent tries to complete all features in a single session, resulting in
  • “The closing point”: Declares the project complete when in reality only 30% of core features are done

The final “The closing point” brings the discussion to “Declares the project complete when in reality only 30% of core features are done”. The useful thing to carry forward is knowing which judgments must be revisited when input, scale, or risk changes.

Mark as learned Your reading progress updates automatically
← PreviousNext →

Keep reading

The next useful article in the thread.

ARTICLE DISCUSSION

Leave one useful thought here.

Keep the idea that clicked, the question that stayed open, or a small note for the next learner.

Discussing Why Agents Can't Handle Long Tasks Engineering Patterns for Reliable Agents
3discussionsArticle discussion · synced with the Circle
View in the learning circle
AM
Asha MorganContent editor
INSIGHTField note

I turned one judgment from this article into a small experiment I could run today. Knowing what to observe next is more useful than simply remembering the conclusion.

ARTICLE DISCUSSION7 helpful
LH
Lin HarperIndie developer
INSIGHTInsight

After reading this, I first looked for the conditions behind the idea instead of copying the method into a project. That order made the later trade-offs much clearer.

ARTICLE DISCUSSION5 helpful
KM
Kiki MooreProduct operations
QUESTIONQuestion

When this judgment reaches real work, which constraint should be added first? I am curious which step matters most between reading and the first practical attempt.

ARTICLE DISCUSSION4 helpful