6 min read
Context engineering. Six principles from Manus, and who should manage a digital employee's context
We read the Manus team's public material on context engineering, from the 2025 blog post to the later workshop and interviews, extracted the checkable principles and thresholds, and compared them with how createrole compresses context on the server today. Five principles are aligned. One is not.
- context engineering
- survey
- agent
- memory
An agent feeds its entire prior state to the model at every step. How that context is assembled, how it is compressed, and whether compressed material can be recovered decides whether a long task gets finished. In September 2026 we read everything the Manus team has said publicly about context engineering: the July 2025 blog post, the October 2025 workshop with LangChain, and transcripts of several interviews. This post collects the checkable parts and compares them with our own approach.
Why context beyond 200K does not matter
Manus co-founder Yichao Ji has a widely quoted line: context beyond 200K stops mattering. The reason is not that the model cannot hold it. Three things happen first:
- Observations are huge. One web page or PDF can consume tens of thousands of tokens.
- Performance degrades with length. A window may advertise a million tokens, but repetition, slowdown and quality loss usually start around 200K.
- Long input is expensive. Even with prefix caching, the input to output ratio is often 100 to 1.
His answer is to give the model compression awareness. When context gets long, it should know to offload information to the file system and keep only a summary. It should also understand that the information was compressed, not lost, and can be fetched back by path when needed.
The six principles from the blog post
The original post is titled Context Engineering for AI Agents: Lessons from Building Manus. Each principle fits in a sentence:
- Design around the KV cache. Hit rate is the single most important metric for a production agent. Keep the prompt prefix stable, never put a second-precise timestamp at the top, append only, serialize deterministically.
- Mask, do not remove tools. Tool definitions sit at the front of the context. Changing them mid-task invalidates every cached token after them and leaves the model referencing tools that no longer exist. Constrain choices with logit masking instead.
- Use the file system as context. Any irreversible compression carries risk, because nobody can predict which observation becomes critical ten steps later. Compression must be restorable: drop the page content but keep the URL, drop the document but keep the path.
- Manipulate attention through recitation. A typical task takes around 50 tool calls and the model drifts. Manus keeps a todo file and rewrites it constantly, pushing the global plan into the end of the context where recent attention lives.
- Keep the wrong stuff in. Erasing failure removes evidence. Leave the failed action and its stack trace in place so the model updates its beliefs.
- Do not get few-shotted. A context full of similar action and observation pairs makes the model repeat the pattern. Introduce small structured variation on purpose.
The October 2025 update: thresholds, a ladder, and a reversal on todo
The blog post gave no numbers. The workshop did:
- Usable length: most models show context rot around 200K tokens. Fitting is not the same as handling.
- Compaction before summarization. Every tool call has a full and a compact representation. The compact one strips whatever can be rebuilt from external state, so a write-file call can drop its content field because the file is already in the environment. Compact the oldest half of tool calls first, summarize only when compaction hits diminishing returns, and keep the last few calls in full detail.
- The todo recitation was withdrawn. Measurement showed roughly one third of all actions were spent updating the todo list. Manus moved to a separate planner that hands work to executor agents through structured tool calls.
The third point deserves a note. The most cited trick in the blog post was overturned by its own author three months later, with data.
What createrole does today
Our digital employees work on their own computers. Context compression happens on the server, and the model takes no part in the decision. There are four rungs:
- Mask at assembly. Every time messages are assembled, historical tool results beyond the most recent two are replaced with placeholders. The originals stay in the database and a built-in tool can recall them.
- Trim before send. If the estimate exceeds the budget, the oldest tool exchanges or question-and-answer rounds are dropped. The system prompt and the summary are protected.
- Compact mid-turn. When tool calls chain inside one turn and usage approaches ninety percent of the budget, earlier tool results in that turn are masked. We take the more conservative of the estimate and the previous round's measured usage.
- Retry on overflow. If the window is actually exceeded, retry up to twice, and on the last attempt truncate the single oversized message proportionally.
Alongside compression, an asynchronous summary model distills the history, and every URL and absolute path is extracted mechanically into a verbatim appendix. The user sees a notice when compression happens. That notice never enters the model's context.
Against the six principles: constant system prompt, volatile information in the current turn, a fixed tool list, errors fed back unchanged, and a fully rewritten plan file. Five are aligned. File system as context is half done. Placeholders can be recalled, but they carry no path. The model knows a result was omitted and does not know the original file can simply be read again.
The one thing we have not done: compression awareness
Our model never sees how much context it has used. It does not know when a tool result was masked or when a summary replaced history. Its only voluntary offloading actions are writing the plan file and writing memory, and neither is triggered by context usage.
That is the gap. Three candidate directions, lowest risk first:
- Put a recoverable path in the placeholder and write large observations to disk, returning only head, tail and path. A pure template change.
- Inject context usage into the current turn as a signal quantized to ten steps, and require that crossing a step writes confirmed facts, produced file paths and the next step into a notes file.
- Before compression, ask the model for a handoff note, then mask and summarize. The summary model only merges.
We intend to keep plan recitation, but change it from every step to event driven, so we do not repeat the one third of actions on todo. Plan and notes also stay separate. The plan says what to do. The notes say what is known.
References
- Manus blog: Context Engineering for AI Agents: Lessons from Building Manus (July 2025)
- LangChain and Manus workshop, Context Engineering for Agents (October 2025), notes by Lance Martin
- Public transcripts of Yichao Ji's interview on the Zhang Xiaojun business podcast, episode 128 (December 2025)