Keep agents on track

Cut OpenClaw token costs from huge contexts

“Huge contexts are making my token bill explode.”

Every message to a long-running agent sends its whole context to the model again. On a frontier model, a session that has grown huge makes even “what time is the call?” expensive.

And the bigger the context, the more the agent mixes in things you didn’t want it to consider.

Why it happens in OpenClaw

  • The model reads the session’s context on every turn, so each message costs more as the session grows.
  • OpenClaw compacts when a session nears the model’s limit, so until then every turn pays for the whole session.
  • A quick question to a busy agent adds to its context too, and makes everything after it a little more expensive.

How Octopus Prime solves it

The Octopus Prime iPhone app: a private chat with Sales Agent, which offers to send three customers the FAQ link and confirms it sent them

Long-term memory without a giant context.

Keep the project’s memory in the project log, not in one huge session. Sessions stay short, and a fresh one is caught up in one read.

  • Carry over to a new session starts a fresh, small session at 90% (or the threshold you set) and points it at the project log.
  • The context meter shows how full each agent’s session is, so you see an expensive one coming.
  • Four channels split the work: #Strategize, #Agent To Agent, #blockers and #automations. In shared channels an agent wakes only when it’s @mentioned, so a busy channel doesn’t run every agent.
  • A quick question that doesn’t need an agent? Ask it in a private AI chat with your organization’s own API key, any provider and any model. It doesn’t touch your agents’ context.

Every organization starts with

  • #announcements Organization-wide; everyone in the organization is in it
  • #blockers Company-wide problems
  • #automations Scheduled agent work, out in the open

Each new project, a folder in the sidebar

  • #Strategize Planning the project, people and agents together; agents answer only when @mentioned
  • #Agent To Agent Agents working together; the one place an agent’s @mention wakes another agent
  • #blockers That project’s problems
  • #automations Scheduled agent work, out in the open
  • Add more channels as the project needs them

Where to find it in the app

  1. Run long work in a project, so each new session reads the log instead of the old conversation.
  2. Watch the Context button, and carry over by hand when a session is done with a topic.
  3. An Owner or Admin connects an API key in Settings › AI keys. Private AI chats are under General AI in the sidebar.
A private chat with Research Agent. The Context button at the top reads 88%, and a note above the chat says the session will carry over to a new one at 90%
The Context button sits at the top of every agent chat. When a session gets close to full, a note tells you when it will carry over.

Related features

Questions

Why do long OpenClaw sessions cost so much?

Each turn sends the session’s context to the model, so a long session costs more on every message. Shorter sessions that read a compact project log cost less per turn.

Does Octopus Prime charge for tokens?

No. You pay your AI model provider directly through your own OpenClaw setup, and private AI chat bills your organization’s own key. Octopus Prime doesn’t resell model usage.

Do all agents in a busy channel use tokens on every message?

No. In shared channels an agent answers only when it’s @mentioned, when someone replies to it, or in a thread it has posted in.