Context & Memory
Context settings control how Orbicus allocates token budgets, compacts long conversational histories, and manages memory during multi-step development sessions.
The Context Lifecycle
As development sessions progress through multiple file reads, tool executions, and code edits, the prompt context accumulates data. Orbicus manages this lifecycle dynamically to keep reasoning sharp while preventing context overflow errors:
New Turn ──► Token Metering ──► Threshold Exceeded? ──► Sliding Window Compaction
│ │
└── No ──► Send to Model └── Prune & Summarize ──► Send
- Token Metering: Calculates exact input, system, and output token footprints on every turn.
- Compaction: Replaces voluminous historical turns with condensed semantic summaries while preserving critical technical decisions.
- Tool Output Pruning: Discards ephemeral tool data (such as raw 200-line search outputs or completed test runs) once the agent has analyzed and extracted the necessary facts.
Configuring Token Budgets
In Settings $\rightarrow$ Context, you can calibrate limits based on your preferred model's window:
| Setting | Default | Purpose |
|---|---|---|
| Max Context Budget | 128,000 tokens | Sets the hard ceiling for total prompt context before compaction occurs. |
| Compaction Threshold | 80% | The percentage of the context budget at which automatic summarization triggers. |
| Safety Headroom | 8,192 tokens | Headroom reserved strictly for model output generation to prevent cut-off code blocks. |
| Max History Turns | 50 turns | Maximum conversational steps retained before older turns are summarized. |
Best Practices for Token Efficiency
- Tag Specifically with
@: Rather than asking the agent to search your entire codebase, mention exact files or subdirectories to keep prompt tokens lean. - Start Fresh Sessions for New Tasks: Long sessions carrying context from an earlier bug fix can dilute reasoning on an unrelated feature. Start a fresh session whenever you switch goals.
- Use Workdocs for Long-Lived Specs: Instead of repeating complex architecture requirements across multiple chat turns, keep the specification in a Workdoc where it remains compact and continuously referenced.