CH 24 / 86Chapter 3: Thinking in Agents

Designing the Context

On this page8 items

In 10 seconds

Handing over more material doesn’t make it smarter.
Not loading what isn’t needed matters as much as loading what is.

When you give an agent a long task, things start to go wrong partway through. It stops following the initial instructions, the format you agreed on falls apart, and it repeats the same checks.

The cause is usually a crowded desk (No.04). This page is about designing what goes on that desk.

Don’t cram it in#

Let’s start with the most common misconception. Handing over every relevant document does not improve accuracy.

Suppose that for a task of compiling quotations from 5 companies, you hand over the last three years of transaction history. It’s related. But the 5 pages you actually need right now get buried in it.

The rule of thumb is: is this material needed for the very next step? Material that might be needed later can be handed over later.

Keep it outside the conversation#

Things you use for a long time go outside the conversation, not inside it. Where to put them is as we saw in No.05 and No.14.

WhereBest for
In the conversationMaterial needed for the next step
ProjectRules that stay the same for the duration of that work
MemoryFacts about yourself
FilesLong-lived instructions, procedures, glossaries

The bottom row, files, is the new option introduced in Chapter 3. Agents can read files, so if you write your rules down in a file, the agent can go read them itself when needed.

This has advantages over pasting into the conversation:

  • You can reread the contents yourself (and check later what you handed over)
  • History is kept (you can see what changed and when)
  • You can hand it to others (someone else can do the same work)

The fullest form of this approach is Claude Code’s CLAUDE.md, covered in No.25 and No.38.

Summarize and hand off#

When work gets long, break it up and hand off. What No.06 said about chats is even more effective with agents.

A handoff keeps three things:

  • What’s been decided (no further discussion)
  • What’s still undecided (to deal with next)
  • The format to follow (concretely)

Conversely, it’s more important to be conscious of what to throw away: ideas you tried that didn’t work, intermediate calculations, the contents of files you read that turned out to be irrelevant. If you carry these over, there’s no point in getting a fresh desk.

Split work off#

The subagents in No.23 are an implementation of this chapter’s thinking.

For work that produces a lot of output — reading logs, running tests, searching through many files — have it done at a separate desk and receive only the result. The main desk is for making decisions.

For the quotation task, you’d split it like this:

  • Main: decide what kind of table to make, and look at the finished table
  • Split off: read the 5 companies’ PDFs and extract the fields (lots of output)
  • Split off: double-check the finished table (you don’t want preconceptions creeping in)

Signs to watch for#

These are signs the desk is getting crowded:

  • You’ve had to restate the same instruction two or more times
  • The format you set at the start is starting to break down
  • “About what we discussed earlier” no longer gets through
  • Replies are getting longer and the point is getting fuzzy

If even one of these appears, it’s time to break. Handing off and starting fresh is faster than pushing on.

Try it: take stock of the current conversation (3 minutes)

Try this in a conversation that’s gotten long.

Prompt
In this conversation, separate the information that still informs decisions from the information that's no longer needed. For anything no longer needed, add a brief note on why it became unnecessary.

Expected result: It comes back in two groups, with “ideas tried but not adopted” and “intermediate calculations” on the unnecessary side.

If it doesn’t work: If everything comes back as “still informs decisions”, it’s not yet time to break. Knowing that is useful in itself.

Common pitfalls#

Thinking a large-context model means you can cram things in. Size and accuracy are different things (No.04). Being able to hand over a million tokens is not the same as handling a million tokens with the same accuracy.

Writing long handoff summaries. Past 20 lines, the summary itself crowds the desk. What you need more is the courage to throw things away.

Externalizing too much. If you write everything into files, you’ll lose track of what’s in which file. Put only what it should read every time into files.

Summary#

  • Not loading what isn’t needed matters as much as loading what is
  • Long-lived material goes outside the conversation. Files can be reread and keep a history
  • In a handoff, deciding what to throw away matters more than the three things to keep
  • Split off work with lots of output and work where you don’t want preconceptions

Read next#

Designing Instructions