CSE Roadmap

Common tier · about 4 hours · 11 parts

Part 8 of 11 · 2 min read

Mistakes that lose or leak information at the boundary

Common mistakes, and what the example does not do.

Mistakes that lose or leak information at the boundary

  • Returning only the last message and assuming it contains the result.
  • Returning everything and expecting isolation to still help.
  • No failure status, so a failed child looks like a finished one.
  • Forgetting that the child cannot see the parent's context (constraints, user preferences, earlier findings).
  • Giving a child that reads untrusted content write or send permissions.
  • Judging by the parent's tokens only; the children's tokens are real cost.
  • Splitting a task whose steps depend tightly on each other, so the handoffs carry most of the context anyway.

What the example does not do

About this example What the example does not do
  • No models. Sub-agents are scripted and the typed result is pattern matching, so extraction errors, schema violations and invented fields are not modelled.
  • No parallelism or latency. Sub-agents can run concurrently, which changes time but not tokens; the example measured tokens only.
  • No caching. With a prompt cache (module 7) the quadratic term is much cheaper and the saving from isolation is smaller.
  • One topology. A parent calling children once; not nested agents, peer agents or shared memory.
  • Optional real-model experiment: run four real research sub-tasks as one agent and as sub-agents with each result strategy, and compare answers, tokens from the provider's usage field, and what the parent received.

Check yourself

A sub-agent finishes with "Done!" and the parent carries on. What is lost, and what should the contract require?

Show answer

Everything the sub-agent found. Require a typed result: findings, evidence pointers, caveats and a status, with a failed status and a reason when it could not finish.

For the curious Isolation moves cost, not work

The sub-agents still spend tokens; the saving comes from each one re-reading a smaller context, so cost falls roughly with the square of the steps in each. The example halves total input tokens (355,654 to 178,517) on a synthetic task. If the parent needs the intermediate steps to decide anything, isolating them moves the cost without removing it.

What you will use daily at work

Practice What it looks like
A result schema Findings, evidence, caveats, status.
Constraints passed down The child does not see the parent context; its task must carry scope and limits.
Returned text is untrusted Validate it against the schema and do not obey instructions in it.