2.1 Why context beats model choice
Frontier models are increasingly interchangeable for operations reasoning. What they are given is not. An agent that knows your topology, deploy history, conventions, and past incidents will out-diagnose a smarter model that knows none of them. Context engineering is the deliberate design of what enters the model’s context window (the text the model reads on each step), how it is structured, and when it is dropped or refreshed. Two lessons from current practice anchor it:- Bigger windows did not solve it. Model quality drops as the window fills with irrelevant material. Curation beats accumulation.
- Context multiplies cost. When several agents work one task, each pays for every token it carries. Sending each agent only what its task needs is what keeps the economics viable (Chapter 4).
2.2 The five context sources of an operations agent
The first four are durable knowledge, assembled per task. The fifth is fetched step by step: the context layer decides what is worth pulling, the tool layer pulls it (Chapter 3), and summarization decides what survives into the next step.
2.3 Assembly: the context budget
Treat the context window as a production resource with a budget and an allocation policy. These are the slots to allocate for one investigation step. Size them from your own traces: log the tokens each slot uses across a sample of investigations, then cap the working set first, because tool results are usually the largest line (Chapter 1).
Retrieval discipline matters more than retrieval technology. Retrieve broadly, then re-rank hard down to a precise few. Dumping fifty chunks into the window fails in a measurable way: models miss facts buried in the middle of long contexts (Liu et al., “Lost in the Middle”, TACL 2024).
Eviction is the other half. Long investigations must compact: the agent summarizes its own trajectory (“checked X, ruled out Y because Z”), drops the raw excerpts, and keeps pointers so any claim can be expanded and audited later. Compaction is also where fabrication sneaks in. Every summary must trace back to the evidence it compresses, which makes it an evaluation target in Chapter 7.
IN PRACTICE: OVERSIZED TOOL OUTPUTCloudThinker compresses an oversized tool result before the model reads it and keeps the full original in the conversation’s sandbox, so an agent can reopen the raw data when a claim needs checking. A large log query costs a summary’s worth of context, not the whole dump.
2.4 Memory: what to write, what to decay
Persistent memory is what makes an agent deployment hard to copy, and it can quietly rot. Four rules hold up in production:- Write conclusions, not transcripts. Persist the symptom, root cause, fix, and verification, not the 300,000-token trajectory. Give it a fixed structure so retrieval matches on the pattern, not the prose.
- Record provenance on every memory. Who wrote it (human, agent, import), from which incident, when, and how confident. Unattributed memory is how one bad conclusion poisons a hundred later investigations.
- Decay and challenge. Topology changes invalidate old causal paths. Lower the weight of old memories, and let contradicting evidence flag a memory for review instead of letting the two silently coexist.
- Keep a human-curated tier. A small, high-trust layer of conventions and standing decisions (“never do X on the payments cluster”) that only humans edit and that always outranks learned memory. This is a policy surface as much as a quality one.
IN PRACTICE: STRUCTURED INCIDENT MEMORYIncident memory in CloudThinker follows these rules. Each investigation that reaches a disposition writes one recollection with a fixed shape:
A recalled entry is a lead, never evidence: the verdict still rests on data from your systems. A recollection is one incident’s story. A lesson is a pattern seen across incidents, and it is kept only if it cites at least two of them. A fix whose follow-up check fails stays on record as a counter-example.Outside incidents, workspace memory is the human-curated tier. Every member can read it and correct it in plain words, only workspace Admins can edit or delete an item directly, and the nightly Dreaming run merges duplicates and removes what newer conversations contradict.
2.5 Discovery: context as onboarding
The strongest platforms treat context acquisition as a product phase, not a documentation request. On connection, the system walks the account or cluster read-only, records what exists and how it is set up, and shows its understanding to a human before anything else happens. Discovery makes an agent useful on day one and safer later: a system that understands the estate can predict blast radius before it ever asks to change anything. It is also the foundation for operations where nobody has to prompt, because the system already knows the estate well enough to bring findings, plans, and evidence for approval. Without a context layer, that direction is reckless.IN PRACTICE: DISCOVERY BEFORE ACTIONThe first time a connection reaches Connected, CloudThinker runs Discovery, one background investigation of the service you just connected, for at most 30 minutes. When it finishes, the Discovery section of the connection’s detail panel then shows evidence (each fact cites the read that produced it), related connections worth adding, and suggested recurring checks you can turn into automations. Reads run freely; every change still goes through Approvals. Discovery runs once per connection. After you widen the credential’s permissions, or add credits if it paused on a low balance, click Run Discovery on the connection to run it again (workspace Admin role).The question to ask of any platform: what does it know about your estate one hour after you connect it, and can it show you the evidence?
2.6 Audit an agent’s context
Run this checklist when an agent gives a weak or wrong answer, before you change models or prompts:Next steps
Chapter 3 · Tools, Skills, and the Protocol Layer
How tool design decides safety and reliability, and how to run MCP in production.
Workspace memory
See, teach, and correct what CloudThinker remembers about your workspace.