Core concepts

Context window management

Learn how Bob's 270,000-token context window works, how each category contributes to token usage, and best practices for keeping tasks focused and cost-efficient.

Understanding the context window

Each task in the chat panel has a context window — the token budget for that thread. The cap is 270,000 tokens. Everything Bob loads counts against it.

What fills the window

Hover over the token usage indicator in the top right of the chat panel to see a breakdown of what is consuming your context window:

Context window breakdown panel showing token usage by category
CategoryWhat it includes
System promptBob's core instructions for the session
Tool definitionsBuilt-in tool schemas and connected MCP tool definitions
MCP ToolsInstructions and descriptions for tools provided by connected MCP servers
RulesCustom instructions from project and mode rule files (for example, AGENTS.md or .bob/rules-*)
SkillsInstructions from skills Bob loaded for the conversation
MessagesYour prompts, Bob's replies, and tool activity in the conversation. This is the transcript counted as tokens.

@ mentions, command output, and tool results all count toward Messages. File contents do not get a separate line.

Under Estimated breakdown:

  • Reserved for model response: Tokens held back for Bob's next reply (typically 20.0k).
  • Available space: Remaining free tokens.

Baseline overhead

Fixed categories use context before you even begin working with Bob. On the Galaxium Travels sample project, even "Quickly say hi back." totals about 8.5k tokens. Most of that is Tool definitions (5.1k), System prompt (1.5k), Rules (830), and Skills (454). Only 590 is in Messages.

Bob re-sends the full overhead stack on every prompt. More MCP servers or loaded skills increase MCP Tools, Tool definitions, and Skills before you type.

For hands-on numbers and a reset walkthrough, see Create a new context window.

Monitoring your token usage

The token usage indicator shows percent full and a used/total fraction against the 270,000-token cap. Click it to open the context window breakdown. Check which category is growing.

The following table shows what influences each category:

CategoryWhat makes it grow
System promptLoaded when the task starts. Stays flat during normal work.
Tool definitionsBuilt-in tool schemas. Set when the task starts. Stays flat during normal work.
MCP ToolsConnected MCP servers and enabled tools. Grows when you add servers or tools, not when you send prompts.
RulesProject and mode rule files (for example, AGENTS.md). Set when the task opens.
SkillsSkills Bob loads for the task. Can increase if Bob activates a skill mid-thread.
MessagesYour prompts, Bob's replies, file reads, tool output, and @ mentions. Grows with every turn and with repo exploration.

In a short exchange, fixed categories often use most of the total. When you ask Bob to read files or run tools, Messages usually becomes the largest category. Watch for this shift.

Available space shrinks as any category grows. Reserved for model response is set aside for Bob's next reply. It is not part of the used total above it.

For measured examples on a real repo, see Create a new context window.

Token limits

The hard cap is 270,000 tokens per task. Bob starts condensing before you reach the limit. Condensation typically begins around 190,000 tokens of total usage.

Automatic context condensation

At the condensation threshold, Bob:

  1. Preserves the most recent and relevant context.
  2. Summarizes or removes older conversation segments.
  3. Maintains critical system instructions, tool definitions, rules, and skills.
  4. Continues with the condensed context.

Condensation is lossy. Details from early in Messages might not survive. Start a new task with + (New task) when you change topics or when Messages is large enough to hurt quality.

Impact on Bobcoins

Bobcoins track token usage. Both input and output tokens count.

  • Each message sends the full active context again, including fixed overhead.
  • Bob re-processes what is already loaded on every send.
  • Long threads with heavy Messages cost more per later prompt.

Best practices

The context window is not storage. It is working memory — what Bob can use at each step. Control what goes in. Reset or condense when the thread fills with stale output. Check the result with tests, not just Bob's reply.

Scope the task and the conversation

Use one task per work goal and start with a narrow prompt. State the goal, expected outcome, and constraints before asking Bob to explore the repo. Name files and functions explicitly. Avoid vague requests like "read the whole repo" or "check the backend." Click + (New task) when the topic changes — unrelated content in Messages adds cost and can confuse Bob.

Keep standing context lean

Fixed categories consume tokens before you type anything. To keep that overhead low:

  • Keep custom rules and AGENTS.md short — put only setup, test, and style commands there (for example, pnpm test, mvn verify).
  • Connect only the MCP servers, tools, and skills the current work needs. Disconnect what you are not using, and prefer project-scoped MCP config over global.
  • Reserve Messages for situational evidence specific to this task — the bug, logs, and relevant files. Do not repeat standing rules in every prompt.

Add context when you need it

Let Bob search and read targeted files rather than pasting large blocks of content into the thread. Use context mentions to reference a specific file or line range, and avoid broad directory mentions:

✓ @/src/utils/validation.ts:45-67 Fix the email validation logic
✗ @/src @/tests @/docs Review everything and suggest improvements

You can also highlight text in the editor and use Cmd + L (Mac) or Ctrl + L (Windows/Linux) to add it directly to the chat.

Work in stages — find likely files, inspect the relevant ones, plan, change, and validate. For broad repo reads, use subagents so the task receives condensed results rather than every read_file call landing in Messages. When sources conflict, trust running code and tests over stale comments or old README notes.

For more tactics on large repos, see Working with large projects.

Reset or condense when Messages fills up

Over a long conversation, Messages accumulates repeated file contents, abandoned plans, and stale tool output. Start a new task with + (New task) when the work goal changes or when the thread is large enough to hurt quality. Keep constraints, evidence, and open questions — remove the rest.

Bob can also condense older segments automatically, but condensation is lossy and details from early in Messages may not survive. Prefer small, approved changes over one large autonomous run so diffs stay reviewable and Bob stays on track.

Learn more

See Create a new context window to open the breakdown on the Galaxium Travels sample project and practice a reset.

How is this topic?