Tech / [32]

Solving the context problem between agents

I saw a lot of people saying that switching context between agents burns tokens. So I read the OpenBot code and two Anthropic articles. The cost is usually in the flow.

This week I saw a lot of people saying that switching context between OpenBot agents burns tokens. It came up in a post and in group chats, always with the same complaint: the agent reads too much, answers too much, and the bill goes up.

So I went and read the OpenBot code, the tool I use to orchestrate the agents. It already handles much of this under the hood. There is a local queue, silent routines, context compaction, and channel history that gets summarized instead of dumped whole into the prompt.

A local queue is the request waiting its turn instead of becoming a new call. A silent routine is the one that ends without sending a message when there is nothing to report. Compaction is the summary that takes the place of the old conversation. Summarized channel history is the same idea, applied to the channel.

That changes the conclusion. Most of the time the cost does not come from a missing feature in the tool. It comes from how we design the flow on top of it. The problem is us, not the agent.

Still, two Anthropic articles made me change a few things. One is about when to fold subagents into the main agent loop, from October 22, 2026. The other is about always-on agents, from November 13, 2026. Both links are at the end.

1. What the two articles say

In the first one, Anthropic’s Applied AI team compares agent designs across companies. In most of the cases they describe, a single agent with skills and well-written tool descriptions delivered better answers at lower cost than an orchestrator with several subagents. At one customer, the single-agent design ran about twice as fast.

The reason is context. Each subagent opens its own window, and what leaves one and enters another is a summary. Every summary loses detail. Anthropic calls it the telephone game.

The second article shows the cost that stays hidden. Every run of an always-on agent starts by loading the system prompt, the tool definitions, and the memory files. That weight goes into every run, not just the first. When a session gets long, you either compact the older messages or start a new session. Both lose detail.

2. Stop using channels

OpenBot makes it easy to set up a channel with five bots talking to each other and to you. It is easy to build and expensive to run.

A channel duplicates context windows. It adds latency, especially when the providers are different. And it turns summaries into the telephone game, because every handoff loses a piece.

What I do: I keep the flow in one main agent with skills, subagents, and tools. A channel is for work that is truly parallel and isolated, the kind that needs a fresh context and can be thrown away at the end.

In practice, almost all of my work today is one main agent. The others come in when I need an account or a service it does not have, and the conversation is short: the goal, what I already tried, what I want back.

3. Pass a pointer, not text

Each OpenBot agent has its own memory and session. If agent A pastes a whole research dump into the chat for agent B to read, both end up with the text in context. The same text is billed twice.

The way out is to save the heavy material to a file and pass the path. I use the OpenBot shared folder. Anything that already lives in another system stays there: a doc in Linear, a note in Obsidian, a page in Notion. The next agent only opens the file if it needs to.

Anthropic recommends the same in the always-on agents article: memory should keep only what the agent cannot look up again. If the data already lives somewhere else, store the pointer.

4. Trim memory and skills

OpenBot’s native memory goes into the agent’s instructions. Every active skill adds weight to the first prompt too. Many skills loaded at once cost on every message.

Anthropic calls this path progressive disclosure. The agent sees a short index at the start and loads the detail only when the task asks for it. In OpenBot, that means keeping memory short and leaving active only the skill that agent actually uses day to day. If memory needs more, you can pair it with an external MCP, such as Obsidian or Mem0.

I am still cleaning this up on my own agents. I have skills turned on that the agent has not used in months.

5. What I have not measured

I have no number for how much I saved. I did not run the same task before and after with the bill open, and I am not going to guess a percentage. What I have is the monthly bill and the impression that it stopped climbing for the same work.

I also did not test the parallel agent limit on my machine. What I know is what the documentation says and what shows up in my own use.

6. Frequently asked questions

What is context switching?

It is one agent handing another what it already knows. The text goes along and takes up the second agent’s window.

What is progressive disclosure?

It is loading a light index first and fetching the detail only when the task asks for it.

Does a channel between agents cost more tokens?

In my use, yes. Each agent keeps its own session, and everything that travels in the channel is read by all of them.

Do I need to turn off every skill?

No. You need to leave active only the ones the agent uses. An idle skill still costs prompt space on every message.

Saving tokens in this kind of orchestration is not about squeezing the prompt. It is about not opening a new window for no reason and replacing long text with a well-organized pointer.

7. Sources

The post that started this article is here.

Leave a Reply

Your email address will not be published. Required fields are marked *