H-07Action & ErgonomicsDesignEngineering

Local Handles & Progressive Disclosure

Shrink Inference Distance with short, copy-safe local references, and lazy-load specialized tools and context on demand instead of dumping catalogs upfront.

Human UXAgent AXRecognition rather than recall→Local handles

Think about the last time you copied a 36-character ID by hand. You probably checked it twice, character by character. Agents do that kind of copying all day, often from far back in their context, and the shortcuts they reach for have their own traps.

A finance-operations agent is getting the vendor sheet ready for Friday's payment run. Halvorsen Freight has emailed new bank details. The task: update their account number, and while you're in there, remove the duplicate vendors finance flagged last week.

Early in the session the agent calls find_rows(sheet="vendors", query="Halvorsen"). Two rows come back: line 140, "Halvorsen Freight AS", a duplicate, and line 212, "Halvorsen Freight", the real one. The agent makes a note: the account change goes on line 212. Then it gets to work on the duplicates.

That work takes a while. It pages through the 1,800-row sheet, compares names and tax IDs, and deletes two rows: line 88 and line 140. About 30,000 tokens later it comes back to the original job and calls edit_row(sheet="vendors", line=212, set={acct: "…3381"}). The tool replies {"status": "ok"}.

Line 212 is now Holm & Sons. The two deletions above it moved every row up by two, and Halvorsen Freight sits on line 210. On Friday, Holm & Sons' payment goes to Halvorsen's new bank account, and Halvorsen's payment goes to an account it just closed.

Nothing the tool said was false when it said it. "Line 212" was true when the search ran and false after the deletes, and nothing told the agent.

Why it happens

A person doing this job in a spreadsheet app never types a row's address. They search, the row lights up, and they click into the cell. If rows above get deleted, the selected row stays selected as it moves up. Jakob Nielsen's sixth usability heuristic names the principle: recognition rather than recall. Good interfaces let people point at things they can see instead of remembering how to name them.

The agent has only recall. Everything it knows sits in one long line of text, read in order, with the oldest parts furthest back. The Guide calls this the 1D temporal ribbonLexicon · 081D Temporal RibbonThe linear token stream through which an agent perceives reality.. There is no highlight and no cursor on it. To refer to a row, the agent has to find where the row's address appeared on the ribbon and write that address out again, character by character.

Fitts's Law, from human motor control, says the time to hit a target grows with its distance and shrinks with its size. Agents have their own version. The distance is how many tokens back the reference appeared. The size is how easy the reference is to reproduce: short and distinctive is a big target, long and similar to its neighbors is a tiny one. The Guide calls the combined effort inference distanceLexicon · 33Inference DistanceProbabilistic effort of accurately generating arguments across token span., and every argument an agent copies from earlier context pays it.

The row's real ID is a poor target on both counts. It is 36 characters, it is 30,000 tokens back, and the vendor rows were created in one import batch. These IDs are UUIDv7, which begin with a timestamp, so rows from one batch share a long prefix. Hollis Packaging, the next row down, has an ID that starts with the same 15 characters as Halvorsen's. The duplicate pass has put hundreds of these lookalikes into the context.

The figure below puts the three ways of pointing at Halvorsen's row side by side. Switch between them and compare how far back each one sits and what the agent has to copy.

Reference
Tools
Context~30,000 tokens back90 tool schemas, ~18,000 tokensedit · ~51,000 tokens in contextsheet readAgent writes0193a4f2-7c1e-7b3a-9d42-5e8f0c6a1b93Halvorsen Freight0193a4f2-7c1e-7f05-a3c8-1d6e94b2f027Hollis Packaging, the next row36 characters to copy exactly, and the first 15 match the next row's

UUID: 36 characters, far back, and the next row's ID starts with the same 15.

Fig. 7.1Three ways to point at one row. The UUID is a tiny target far away. The line number is a big target that moved. The local handle sits just as far back, but it is two unique characters bound to the row itself, so it is easy to copy and deletes above it change nothing.

The line number fails differently. Three digits are easy to copy, so inference distance is low. The problem is what the number points at: a position, and positions move. After the deletes, the agent's belief about the sheet and the sheet itself have come apart. The Guide calls that gap world-model driftLexicon · 20World-Model DriftDivergence between the agent's internal beliefs and actual environment state.. Line numbers create drift silently, because every insert or delete above the target moves it without any message. The same trap catches coding agents told to "edit line 212" after a patch above it, and any tool that addresses things by offset, page or index.

Something else was on the ribbon too. Before the agent did anything, its context was loaded with the full catalog of 90 tools across sheets, billing, CRM and reporting. At an estimated 200 tokens per tool definition, that is about 18,000 tokens of schemas, most of which the session never uses. The Guide calls this tool-schema bloatLexicon · 38Tool-Schema BloatUpfront context consumption caused by oversized or granular tool catalogs.. It is one more heavy block for the agent to read past, and it leaves less room for the work.

A big catalog also brings lookalike tools. The sheets toolset has edit_row and edit_rows. Billing has update_vendor and update_vendor_bank. An agent holding all four has to choose, and a call to update_vendor_bank would skip the sheet entirely and write straight to the billing system. Tools and documents the task doesn't need, steering the agent toward the wrong one, cause what the Guide calls context confusionLexicon · 23Context ConfusionIrrelevant schemas or documents misleading the agent's tool selection..

What it costs

Wrong writes that report success. A line-number edit that lands on the wrong row returns ok. So does an edit by a UUID copied from the row next door. Both are valid calls on real records. No error fires, and the mistake surfaces when a vendor calls about a missing payment.

Retries that re-read the world. When the agent mangles one character of a UUID, the edit fails with "not found." The usual recovery is to read the sheet again to get the ID, which puts another large block of lookalike IDs on the ribbon and makes the next copy harder.

A standing tax on every turn. An 18,000-token catalog is sent with every model call in the session. Prompt caching lowers the price, but the tokens still fill the window and compete with the work for attention.

Supervision. After one misdirected payment, finance will want a human to diff every edit before the run. For an agent whose job was sheet maintenance, that review is most of the job.

The fix

In plain words: let the agent point instead of recall, and give it only the tools the current step needs.

  1. Hand out short handles. The tool gives each row it returns a short name, like v2, and accepts that name in later calls.
  2. Bind handles to identity, never position. v2 means Halvorsen Freight's row for the rest of the session, wherever it moves.
  3. Echo the label on every use. Each write says which handle it touched and what that handle is, in human words.
  4. Version the data. A write that names an old version fails loudly instead of landing on whatever moved into place.
  5. Load tools on request. Start with a small core set and a one-line index of the rest.

Here is the search from the hook, before and after.

Beforefind_rows → 75 tok
{
  "matches": [
    {
      "line": 140, 1
      "id": "0193a4f2-7c1d-7f60-b2c4-91e0d3a5f812",
      "vendor": "Halvorsen Freight AS"
    },
    {
      "line": 212,
      "id": "0193a4f2-7c1e-7b3a-9d42-5e8f0c6a1b93", 2
      "vendor": "Halvorsen Freight"
    }
  ]
}
  1. 1Rows are addressed by position. Line 140 and line 212 are true only until something above them is inserted or deleted.
  2. 2The only stable identity is a 36-character UUIDv7. Rows from one import share its timestamp prefix, and the agent must copy it exactly from far back.
Tokens75
Characters copied to name the row36 chars
Afterfind_rows → 85 tok
{
  "sheet": "vendors",
  "version": 41, 1
  "matches": 2,
  "rows": {
    "v1": { "vendor": "Halvorsen Freight AS" }, 2
    "v2": { "vendor": "Halvorsen Freight" }
  },
  "handles": "session-scoped; inserts and deletes don't move them", 3
  "edit": "edit_rows(rows=[\"v2\"], set={…})" 4
}
  1. 1A version number for the sheet. A write by position against an older version is refused, so a stale belief fails at the door instead of landing on the wrong row.
  2. 2Two-character handles issued by the tool and bound to each row's identity. Nothing else in the context looks like v2, so copying it is trivial.
  3. 3Handles live only as long as the session. A hand-off to another agent or a new session needs the real ID, which the tool keeps and returns on request.
  4. 4The exact edit call, ready to copy, with the handle already filled in.
Tokens85
Characters copied to name the row2 chars
Illustrative example

Pin 2 does most of the work. The tool already knows which row is which, so it does the bookkeeping. It keeps a small table that maps v1 and v2 to the real IDs and hands the agent the short names. The distance on the ribbon stays the same, but the target grows: two characters that nothing else in the context resembles, instead of 36 that hundreds of IDs nearly match. Git does the same for people: you can type the first seven characters of a 40-character commit hash, and it asks for more only when seven are ambiguous.

Pin 1 closes the line-number trap from the other side. Deleting line 140 bumps the sheet's version. A careful tool can still accept v2 after that, because the handle follows the row. What it refuses is an edit by position against an old version, which is exactly the call that went wrong in the hook.

Pin 3 is the honest trade. Handles are short because they are local. Anything that leaves the session, such as a report or a hand-off note, should carry the real ID. Pin 4 saves the agent from assembling the edit call itself.

The edit response finishes the loop by saying what it changed, in words the agent can check against its intent:

{
  "status": "ok",
  "edited": { "v2": "Halvorsen Freight" },
  "changed": { "acct": ["…9470", "…3381"] },
  "version": 44
}

A wrong target would show up by name on the same turn. When a handle isn't available, the next best address is a content anchor: where={vendor: "Halvorsen Freight"}, expect=1, which fails if it matches zero rows or two. Many coding agents edit files the same way, quoting a unique snippet of the old text instead of a line number.

Load tools when the work needs them

The same idea applies to the tool catalog. People don't learn every menu in an app before they start. Give the agent the same deal: a handful of core tools, plus an index of what else exists and what it costs to load.

{
  "loaded": ["sheets"],
  "available": [
    { "toolset": "billing", "tools": 14, "tokens": 2900, "for": "invoices, payment runs" },
    { "toolset": "crm", "tools": 22, "tokens": 4600, "for": "contacts, deals, notes" },
    { "toolset": "reporting", "tools": 9, "tokens": 1800, "for": "exports, schedules" }
  ],
  "details": "describe_toolset(name=\"billing\")"
}

That response is about 120 tokens, standing in for roughly 18,000. The for field tells the agent which toolset matches its task, and tokens tells it what pulling in the details will cost. The Guide calls this the difference between push and pull contextLexicon · 43Push vs. Pull ContextUpfront pre-loaded retrieval versus just-in-time active agent foraging.: pushing everything into the window upfront, or letting the agent pull what it needs when it needs it. Some agent hosts already do the pull side for you, searching a large tool catalog and loading only the definitions that match the task. A server can offer the same deal itself, with a discovery tool like describe_toolset that returns a toolset's schemas only when asked.

The pattern across other tools:

Tool shapeFragile referenceLocal handle or anchor
Rows and recordsline 212, a 36-char UUIDv2, valid all session, echoed with its label
Code edits"line 212" after a patcha unique quoted snippet, rejected if it matches twice
Browser pagesa long CSS selector or XPathnumbered elements in the current snapshot: [12] button "Pay"
Search results"the third result"#r3 plus its title, valid until the next search
Tool catalogs90 schemas at turn 05 core tools and a toolset index with token costs

In MCP terms

There is no handle type in MCP. As the MCP spec puts it, "from the wire's perspective a handle is an ordinary string in a tool result and an ordinary argument to subsequent tool calls." find_rows mints it, edit_rows accepts it, and the rest is your design.

  • Tool description (description). The spec's guidance on stateful tools says to state a handle's lifetime in the creating tool's description. For find_rows, say how long v2 lasts and that deletes don't move it.
  • Tool execution errors (isError). A call with an expired or unknown handle should return an error result that says so, "so the model can recover by creating a new one." Name the stale handle and the find_rows call that reissues it.
  • Resource links (resource_link). Instead of pushing 1,800 rows through read_sheet, return links the client fetches when needed. The host, not the model, decides what gets read.
  • Tool list (tools/list). Keep it to the core sheet tools. The spec says it "MUST NOT vary … as a side effect of other requests on the connection," so no call can add tools. Make the index a discovery tool that returns deeper material as results or resource links.
  • Not in the protocol: short names. The spec's security guidance pulls the other way. It asks for "secure, non-deterministic handles" and warns that "a handle is a name, not a capability." Keep v2 short for the model, but resolve it in a server-side table bound to the caller's authorization.

Spot it in your traces

Here is the session from the hook in a trace log. Turn 5 is where the agent's map of the sheet stopped matching the sheet, and nothing on that turn said so.

TraceA finance agent updating a vendor's bank account
  1. T1
    find_rows(sheet="vendors", query="Halvorsen")→ line 140 Halvorsen Freight AS · line 212 Halvorsen FreightThe real vendor is on line 212. Line 140 is a duplicate.Both answers are positions. They are correct right now and will expire without warning.
  2. T2
    read_sheet(sheet="vendors", pages="1-9")→ 1,800 rows, ~27,000 tokens of names, tax IDs and UUIDsTwo duplicates: lines 88 and 140.Hundreds of IDs starting with 0193a4f2-7c1 now sit between the search result and the edit.
  3. T3
    delete_rows(sheet="vendors", lines=[88, 140])→ { "status": "ok" }Duplicates removed. Back to the bank details.Every row below line 140 moved up by two. The response doesn't say so, and the agent's note about line 212 is now wrong.
  4. T4
    edit_row(sheet="vendors", line=212, set={acct: "…3381"})→ { "status": "ok" }Halvorsen's account is updated. Task done.The edit lands on Holm & Sons. The response doesn't name the row it changed, so the agent can't notice.

Every call succeeded. To find the same pattern in your own logs, look for these signals:

  • Position arguments after a structural change. Find calls that pass line, row, index, offset or page after an insert or delete in the same resource. Each one may point at something that moved.
  • Long IDs copied from far back. For every argument longer than about 20 characters, measure how many tokens back it first appeared. Calls with long arguments and long distances are your riskiest copies.
  • "Not found" followed by a re-read. An edit by ID that fails, followed by a call that reads the same data again, usually means a mangled copy. Diff the failed ID against the real ones: one or two changed characters is the signature.
  • Writes that don't name their target. List every write tool whose success response lacks the target's human-readable name. Each one hides a wrong-row edit.
  • Catalog weight at turn 0. Measure the tokens of tool schemas in the first request, and count how many of those tools the session actually called.

Review checklist

Run these against every tool that returns things the agent will refer to later, and against the tool catalog as a whole.

Review checklist · 6 items
  1. Return a short handle for every row, file, element or result the agent may need to refer to later.How to check Call a list or search tool. Each item should carry a handle of a few characters, distinct from the others in the response.
  2. Bind handles to identity, so inserts and deletes never change what a handle points to.How to check Read two rows, delete a row above them, then edit one by its handle. The edit should land on the same record you read.
  3. Reject writes by position against a stale version.How to check Read a page, delete a row above it, then send an edit with the old line or version. The tool should refuse and return the current version.
  4. Echo the target's human-readable label in every write response.How to check Edit a record by handle. The response should name the record (for example "v2": "Halvorsen Freight") and show the old and new values.
  5. Accept a content anchor with an expected match count when no handle exists.How to check Edit with an anchor that matches two records. The tool should refuse and list both matches with handles.
  6. Keep the always-loaded tool set small, and expose the rest through an index with one-line purposes and token costs.How to check Count the tokens of tool schemas in the first request of a session. Compare it with the number of tools the average session calls.

When laws collide

Handles and lazy loading move information out of the agent's direct view. That pulls against some laws and reinforces others.

  • Pulls against · H-14Memory Metabolism
    Where they clash
    Memory Metabolism hands work to sub-agents and compacts old turns. A handle like v2 means nothing to a sub-agent with a fresh context, and it can lose its meaning when compaction drops the turn that issued it.
    How to have both
    Keep the handle table in the tool, outside the context, so handles survive compaction. When work crosses a session or agent boundary, pass the real IDs in the hand-off and let the receiving agent get new handles with one lookup.
  • Where they clash
    Just-in-time docs put the canonical example right where the agent needs it. Lazy loading hides tools until requested, and an agent can't use an example for a tool it doesn't know exists, so it may improvise with the wrong core tool instead.
    How to have both
    Make the always-loaded index carry scent: one line per toolset saying what it is for, so the agent knows when to load. Put the micro-docs inside the toolset, where they arrive exactly when the tools do.
  • How they combine
    Freshness asks every volatile observation to carry a version. Handles remove the need to copy long IDs, and version numbers tell the agent when its picture of the data is out of date.
    What you get
    Together they turn the hook's silent wrong edit into one of two clean outcomes: the edit lands on the right row because the handle followed it, or it is refused because the version moved.

Model size shifts the balance. The Guide treats the model as the user persona, an idea it calls Persona = ModelLexicon · 12Persona = ModelTreating model family, scale and training as the user persona.: the same interface works differently for different models. Larger models copy long strings from far back more reliably, and smaller, faster models tend to slip sooner. Handles help both, and they matter most where teams run small models to save money.

Terms from this page

081D Temporal Ribbon
The linear token stream through which an agent perceives reality.
33Inference Distance
Probabilistic effort of accurately generating arguments across token span.
20World-Model Drift
Divergence between the agent's internal beliefs and actual environment state.
38Tool-Schema Bloat
Upfront context consumption caused by oversized or granular tool catalogs.
23Context Confusion
Irrelevant schemas or documents misleading the agent's tool selection.
43Push vs. Pull Context
Upfront pre-loaded retrieval versus just-in-time active agent foraging.
12Persona = Model
Treating model family, scale and training as the user persona.
esc

Try “tokens”, “errors”, “stale”, “handoff” or “blast radius”.