Skip to main content

How Context Works

When conversations grow longer, they exceed the model’s context window limit:
1

User

First message from user
2

Cerebrum

Response from Cerebrum
3

User

Another message
4

⚠️ Context window limit

Messages below exceed the limit
5

Cerebrum

❌ Can’t fit
6

User

❌ Can’t fit
To solve this, Cerebrum summarizes older messages to make room for new conversations:
1

📦 Summarized Messages

Older messages compressed into summary
2

Cerebrum

Recent response (with overlap from previous context)
3

User

✅ Fits within limit
4

Cerebrum

✅ Fits within limit

Automatic Summarization

Cerebrum uses a sliding window with overlap approach. The overlap ensures context continuity - when summarizing, Cerebrum preserves context from the previous window so important connections aren’t lost.
WindowMessagesOverlap
11, 2, 3
23, 4, 5, 6Message 3 from Window 1
36, 7, 8, 9Message 6 from Window 2
Summarization happens automatically in the background. You don’t need to do anything special.

What Gets Preserved

When Cerebrum summarizes context, it prioritizes:
PriorityInformation TypeExample
CriticalArchitecture decisions”Using PostgreSQL for the database”
CriticalRequirements from PRD”Must support 1000 concurrent users”
HighService configurations”Backend runs on port 3000”
HighCurrent task context”Working on user authentication”
MediumPrevious solutions”Fixed CORS issue by adding headers”
LowExploratory discussions”Considered Redis but chose PostgreSQL”

Canvas as Source of Truth

The Canvas serves as the persistent source of truth for your project, displaying:
  • Current Environment - Shows the state of a specific environment (dev, staging, prod)
  • Services - All microservices deployed in the selected environment with their configurations
  • PRD Document - Product Requirements Document with all agreed-upon specifications
  • Test Cases - Defines expected behavior and validation criteria
  • Architecture - Visual representation of how services connect and communicate
If Cerebrum seems to “forget” something, ask it to “look at the Canvas” or “check the current environment state.”

Session Continuity

Your work persists across sessions:
  • Conversation History - Previous messages are saved
  • Canvas State - Your architecture and services remain
  • PRD Document - Requirements document is always accessible
  • Environment Configs - All settings are preserved
When you return to a project, Cerebrum can quickly catch up by reviewing the current Canvas state.

Best Practices

When context seems lost, ask Cerebrum to “look at the Canvas” - it shows the current environment, all services, and their configurations.
The Canvas displays the state of a specific environment. Make sure you’re looking at the right env (dev/staging/prod) when discussing changes.
For complex discussions, provide your own summary: “To recap, we decided to use X because Y.”
For very large projects, consider completing major milestones before moving on. This creates natural breakpoints.

Context Limits by Model

Different models have different context windows:
ModelContext Window
Gemini 3 Pro1M tokens
GPT-5.1256K tokens
Claude Sonnet 4.5200K tokens
Claude Opus 4.5200K tokens
Grok 4.1128K tokens
Larger context windows mean less frequent summarization, but all models benefit from Cerebrum’s smart context management.