Skip to content

Usage and appearance

Context Budgets and Limits

How Octant plans every turn within provider context windows, respects limits, and stays honest at the edges.

  • 14 min read
  • 9 sections

Context Budgets and Limits ​

One provider-neutral context planner gates every turn — Chat, Work, Code, tools, memory, attachments, and subagents. Its job is to keep each request inside the provider's real limits without silently dropping the material you need.

Safe input budget ​

The safe input budget is the model context window minus reserves for the response, provider reasoning, framing, observed variance, and a safety margin. No turn is sent over budget, and there is no "send anyway" bypass. When a request does not fit, Octant reduces the input in a fixed order:

  1. Deduplicate repeated content.
  2. Remove superseded snapshots and stale context.
  3. Load only the tool schemas a turn actually needs.
  4. Replace large results with summaries plus artifact references.
  5. Reuse durable summaries.
  6. Summarize older conversation ranges.
  7. Narrow retrieved memory.
  8. Ask you for direction.

Never silently removed: mode and safety policy, authority and approvals, the current request, task and follow-up state, pinned content, and explicitly selected critical material.

Model and service limits ​

Model context limits and service-level limits are shown separately. A service limit that is not reported is unavailable, never unlimited. Octant learns service limits from ordinary responses and low-frequency probes — it does not poll quotas just to animate the interface.

Settings → Usage lists what each provider has reported. Claude Code and Codex narrate their account usage windows during a session; OpenAI-compatible, Anthropic-compatible, and Azure AI Foundry endpoints disclose request and token buckets in the headers of the responses Octant already asked for. A provider that has not spoken yet says so, and a runtime that never will — OpenCode, Pi, the ACP agents, or a local Ollama — says that instead, so you are not left waiting for a number that cannot come.

How Octant knows a model's window ​

Octant finds each model's context window on its own. You are never asked for one, and there is nothing to test. It uses the first of these that names a window, except that a learned limit below the reported one wins:

  1. Set by you. The optional Context window box in the model's details (shown for OpenAI-compatible, Azure AI Foundry, Anthropic-compatible, and Ollama endpoints). It starts empty, and its placeholder shows the window Octant found and where it came from, for example 1,000,000 · Profile. A number you type there wins over everything below. When the provider names the window the model was trained for, as Ollama does, a larger number is saved as that window, since the model never runs with more. Clear the box to go back to automatic.
  2. Reported. The provider's own model listing, or its usage report.
  3. Learned. When an endpoint refuses a request as too long and says its limit ("maximum context length is 131072 tokens"), Octant keeps that limit for the model, sends a smaller request once, and carries on. You see at most the usual compaction notice, not an error. A later request that fits more than the learned window raises it again. A learned limit below the reported one wins, since the endpoint itself refused above it.
  4. Profile. A small catalogue of well-known model families that ships with Octant, is updated with each Octant release, and is never downloaded while you work. A model that is not in it yet is learned from its first refusal instead. Names are matched loosely (DeepSeek-V4.1-Flash, deepseek_v4.1_flash, and deepseek-ai/DeepSeek-V4.1-Flash are one model). A deployment you gave a name of its own, such as an Azure AI Foundry deployment, is matched by the model the endpoint says it served, so its window is known after its first reply. A host that opts in to Octant's reviewed model manifest (OCTANT_REVIEWED_MODEL_MANIFEST=1) also labels a window from that downloaded manifest as Profile, for a model the built-in catalogue lacks. The same match gives the model's longest reply: a model in the catalogue is planned for its family's maximum output, however its window was found, and only a model nothing names is planned with a small default maximum.
  5. Estimate. When nothing above names the window, the meter shows the fill alone (see below).

The context inspector's Limit source says which one was used.

Overrides ​

Per-turn overrides let you pin or exclude content, disable tools, plugins, skills, or MCP servers, and rebuild or inspect the manifest. Pins do not bypass the safe budget. Overrides are scoped to a turn; there is no hidden persistent thread policy.

Compaction ​

Compaction reduces older context without deleting local originals. It prefers deduplication, structured summaries, and provider-native compaction, and only writes a new summary when the result is genuinely net-positive. The default maintenance model is the active provider and model; a cheaper or local model can be configured, and cross-vendor maintenance is opt-in with bounded material.

You can also compact a session yourself: Compact session in the context popover, or beside Rebuild context plan in the context inspector. After you confirm, the earlier conversation is replaced by a summary for what the model sees next; the thread keeps every message. Octant summarizes where it keeps the conversation, and asks the runtime (Codex, Claude Code, OpenCode 2.2.0 or newer, or Octant Harness in Code) where the runtime keeps it. While it runs the popover reads Compacting… and the composer holds send. Afterwards the popover says how much was freed and who wrote the summary, or why it could not compact. The button is disabled, with the reason, while something you can wait out stands in the way, such as a reply that is still running, or a runtime that is not ready. Where the runtime keeps its own history and Octant has no compaction request for it (Pi and the ACP agents), or this version of it is too old, the button is replaced by a line saying so; on a paired device it is left out.

Compacting automatically ​

Octant can compact a thread for you, so you do not have to watch the meter. Choose the rules in Settings → General → Compaction. There are four.

  • Compact Octant threads is on at 85% by default. It covers threads Octant keeps: Octant Harness, and Chat or Work on a model endpoint. When a thread fills that share of its window, Octant compacts it before the next turn. Octant Harness also compacts inside a long turn.
  • Compact runtime threads is Runtime decides by default. Pick a share and it overrides the runtime's own point in the sessions Octant starts. Claude Code and Codex then compact at that share inside a turn too. The other runtimes compact between turns. Octant never changes your own ~/.claude or ~/.codex files. Close to a full window, or on a small one, Claude Code keeps its own point. The row shows each runtime's own setting, read from those files.
  • Compact quiet threads is Never by default. Choose a time from 15 minutes to 4 hours. When no turn has run on a thread for that long, Octant compacts it once per quiet spell. It leaves threads holding under 20K tokens alone. A Code thread is compacted only while the window that ran it is still open.
  • Compact near a usage limit is Never by default. Choose a share from 75% to 95% used of a provider's 5-hour or weekly limit. When a turn leaves the limit that full, Octant compacts the thread once per limit period. First it asks the thread's own provider to write a summary. If you then switch the thread to another provider, the new one starts from that summary. The thread shows a notice with a Switch model button.

Every automatic compaction runs the same Compact session the button does. It has the same refusals: it does not run while a turn is running, once a spend limit is reached, or in a mode that is turned off. A refused compaction leaves no trace. The thread keeps every message. The timeline line says why it ran, for example Compacted automatically · window 91% full, · idle 31 min, or · 5-hour limit 91%.

A compaction reads the whole window once. The limit rule's summary is one more request, which spends a little of the limit that is running out.

Watching usage ​

The active thread's composer shows a circular used-versus-available meter. Opening it — pointer, Enter, Space, or the configured keyboard shortcut — shows used tokens, the context-window maximum, the used percentage, free space, and only the categories the host actually measured. Estimated, deferred, unavailable, or provider-reported values say so. Provider account limits appear in a separate section, and only when the host reported them. For Codex CLI turns, the meter uses the latest request's context occupancy and window size reported by the app-server, rather than cumulative input tokens or account quota. These values are retained with the turn and restored when the thread is reopened, including Chat usage reconciliations. The meter labels planner health as Next turn so it is distinct from the last reported window reading. Older Chat reconciliations without these fields retain the legacy input-token and planned-window fallback until a new provider usage report arrives; they cannot recover runtime occupancy retroactively. Code turns without context values need a new provider usage report before a context percentage can appear. A thread that has no plan yet is checked again when its turns advance; reopening the app is not required to pick up its first plan. For Claude Code threads, the popover also says how much room is left before the runtime compacts the session by itself, for example 152.8K until auto-compact. That figure is the runtime's own compaction point, which Claude Code states when the session opens, less what the latest request put in the window. It appears only while the runtime says compaction is on and has given a point, so a thread whose runtime says nothing, such as one on Codex CLI, shows no line rather than a guess. Claude Code compacts the session by itself when it reaches that point; Compact session (see Compaction) does it when you ask. When no setting, provider, refusal, or profile has named the model's context window, the meter shows what the window holds and nothing to divide it by: the figure has no maximum and no percentage, the ring stays empty rather than full, and the popover says no window was reported. Octant plans a Chat turn on such a model against a 256,000-token estimate so that an ordinary thread is sent whole; the context inspector lists that limit as an estimate and the number is never shown as the model's window. The first window any of those sources names replaces it, from the next turn on. Opening the popover does not make a further provider or network call.

What fills the window ​

Open the chevron beside the figure to see what the window holds. Each part has one colour wherever it appears: the popover's bar and key, and the entries in the context inspector. Free space and Reserved are always grey. Parts are listed in a fixed order and the colours are chosen so that neighbouring parts look clearly different in both the light and the dark theme. The colour never carries the meaning alone: every part is named beside its swatch, with its tokens and share. The ring itself stays amber, and turns red when the window is nearly full.

What the breakdown can say depends on the runtime:

  • Claude Code reports its own categories after each turn: system prompt, system tools, MCP tools, memory files, skills, agents, messages, and the room it keeps in reserve. They are shown as the provider's figures. Tools it knows of but has not loaded are counted as deferred and take no share of the bar. Memory file paths and skill names are never kept, only how many there are. If Claude Code does not answer in time, Octant counts what it adds as for the runtimes below, and stops counting what it sent once Claude Code compacts the session.

  • Codex CLI, OpenCode and Pi report one occupancy figure and no categories. Octant counts what it adds itself, each part marked Estimated (a conservative estimate: four characters to a token, and an image by its size up to 1,600 tokens):

    • Octant tools: the definitions of tools Octant registered with the session.
    • Octant instructions, Skills and Attachments: what Octant sends with the prompt. Instructions and skills go once per session and again only when they change. In Codex and Claude Code they travel beside your message, so those programs' own history and thread titles show what you typed. These runtimes keep every copy they were sent, and Octant adds them up. Once the runtime compacts the session it keeps a share of earlier turns Octant cannot measure, so from then on these stay in Other (provider) and the breakdown says so. The same happens if Octant could not count an earlier turn of the session.

    Everything else the provider reported is shown as Other (provider), also marked Estimated, because what is left of a figure after an estimate is not exact. A runtime that gives no window size shows no share at all.

  • Mistral Vibe 3.0.3 reports per-turn token usage after a turn when a valid pre-prompt baseline and final receipt are available. It includes context occupancy when the latest runtime snapshot matches those final counters. It reports no breakdown of the context's contents. A newer Vibe release reads the same way, marked unverified. Vibe releases older than 3.0.3 report no usage, so there is no window to show.

  • Other ACP agents show the context window they state in ACP's standard usage report, with no breakdown of its contents. An agent that states no window shows none.

  • A planned thread (Octant Harness, Chat, Work) shows the categories Octant itself attributed, as before.

The parts and Other (provider) always add up to what the window holds. If the runtime's breakdown is a little larger than the last request's fill, because it was taken after the reply, the window is shown as the larger figure. While a turn is still running, the breakdown is from the last turn that reported one and the difference lands in Other (provider).

Inspecting the plan ​

Inspect context opens the composition list so you can pin, exclude, or rebuild the next-turn plan. A thread that has not been planned yet is an empty answer, not a failed connection. Switching the active pane closes a popover or inspector that belonged to the previous thread and retargets every value.

The Usage destination and Settings also show provider-reported capacity. Rolling windows show the percentage left and time until reset. Absolute limits also show the remaining count. Account-scoped limits can include activity from other apps; model and provider-instance limits are labeled separately. After a reset time passes, Octant waits for an updated reading instead of assuming the quota has refilled. Missing windows are not counted as zero, and a failed refresh keeps the last successful reading visibly stale.

The planner, manifest, and limits on this page do not change with that placement. Sensitive values are redacted in previews.

When you are blocked ​

Octant will not send an over-budget turn. Remedies include unpinning or excluding content, compacting a range, unloading optional tools or MCP servers, replacing raw results with artifact references, reducing the output reserve, switching to a larger-context model, or starting a fresh thread with a structured handoff.

A turn can also stop as Interrupted because the provider has no capacity for it right now. The turn says why and, when Octant knows, how long to wait: for example, after a provider rate-limits a turn, Octant holds new turns on that provider for the wait the provider asked for, up to a minute, and then sends them again. A turn that failed for another reason, such as a request the endpoint rejected, shows that error instead, and your next turn runs as usual.

Unreported thread usage ​

A new or unused fork has no provider usage report of its own. Its context disclosure shows Not reported until a report arrives; a provider-reported zero remains zero. Available account-limit readings are shown independently.

Next steps ​

Octant documentation · local-first by design