Settings and budgets
Status: Ready
Truth label: Limited
Audience: Fleet operator, System designer
Reader outcome: Set operator-wide defaults once, declare which inference hosts count as local, and bound what reaches a model.
Last verified: 2026-09-12
Full guides: Chat defaults, Local processing hosts, Context budgets
Sizing procedures, bounds, and the diagnostics for each control on this page are in Advanced configuration.
Settings home
Open Settings in the sidebar. #tab=settings opens this page directly.
It has three sections:
| Section | What it changes |
|---|---|
| Defaults, models and budgets | Saved operator defaults, declared local model hosts, and context limits through their existing editors |
| Operating instructions | Complete authoritative instruction files and links to configuration editors |
| Cortex preferences | Theme, density and the API token stored in this browser |
Current prompt controls live in Chat settings directly above the Chat composer. Change them before each prompt; Send and Queue retain each prompt's selections. The expandable panel preserves the draft and current values. Saving shared defaults leaves the current conversation unchanged until explicitly applied. Run details remain beside work on desktop and in a sheet on mobile.
Manage Cortex and its existing editor links continue to work. A combined link
such as #tab=settings&manage=chat-defaults-btn opens an editor over Settings.
Closing it retains the Settings route.
Operating files and resources
Open Settings > Operating files and resources. Choose the host that owns the files and a registered project, bundled governance or installed worker instructions. Read and edit complete local content with live character counts, aggregate limits, validation, current hashes and retained history. Local project memory stays authoritative; Brain indexes it.
Governance saves publish a distinct version. Restart workers on that installation to load it. Installed personas and skills also require a restart to clear cached instructions. Existing methods, voices, sources and defaults remain in their owning editors, reachable from this inventory. Credentials, process environment files and application source are outside the text editor.
A selected remote worker handles file requests over its existing authenticated outbound connection while idle. Expired or unacknowledged requests remain explicit; inspect the current hash before another save after an unknown outcome. Task attempts now combine policy/file identities, references and prompt allocation records in Operating resources and input evidence. Availability, retrieval and prepared input are not claims of native reads or model compliance.
The complete operating-file guide explains coverage, limits, publication, recovery, storage and evidence states.
Chat defaults
Open Settings > Chat defaults.
This manages the operator's voice, lens, saved source selection, provider and model, sampling, audience, format, writing mode, example retrieval, polish, the optional meaning verifier, and automatic memory saving in one versioned record.
Edit them
- Each Inherit checkbox leaves that field to process configuration or its built-in default. Uncheck it to supply an operator value.
- Preview effective defaults. The result names each value's source and provider support. Preview does not generate text or contact a model.
- Save. New requests that omit settings use the saved revision immediately. Existing conversation controls keep their values.
- Choose Use saved defaults in this conversation to replace the current controls. Starting a new conversation also loads the latest defaults, and a browser reload restores the cached conversation settings when present.
History restoration and JSON import populate the editor. Preview and save create a new revision. Export downloads the saved override set. A stale save preserves unsaved controls and requires reloading. Removed profile or source references remain visible as unavailable so they can be repaired.
Load current conversation into editor copies its controls for review while preserving defaults for settings absent from the composer. Custom source choices must first become a named selection in Sources, then be chosen here. Saved presets resolve their current definition for each new inherited request.
Resolution
Precedence is explicit request, then operator value, then process configuration or built-in fallback.
| Value | Meaning |
|---|---|
| Null operator value | Inherit |
| Explicitly present null on a request sampling field | Reset to the provider default |
| Omitted request field | Inherit |
| Explicit blank audience or format | Overrides a saved value |
| Explicit false memory saving or polish | Overrides a saved value |
Polish supports off, auto, and always. Toggling the conversation checkbox records an explicit on or off override.
Brain resolves one defaults revision at the start of each shared chat turn. Generation settings retain the operator settings revision, the setting origins, and the resolved writing context. Both HTTP and streaming use that resolution.
The older Voice and drafts default picker updates the same record and revision, so neither editor can silently overwrite the other. Legacy voice rows are read without a migration write, and the first save retains that baseline in history.
Boundaries
This editor does not manage credentials, endpoint URLs, worker settings, or project scope. Provider discovery and a successful save do not establish model availability or writing quality.
Storage is operator_settings and operator_settings_versions in
writing.sqlite3. Null fields are portable inheritance declarations, so an
imported record can resolve differently on another installation. Compare the
effective preview before saving.
Local model hosts
Open Settings > Local models.
Declare exact Ollama hostnames or IP addresses that belong to your local processing environment. This permits local-only writing, approved examples, context, and comparison cases to reach that endpoint. It supports a local server reached over LAN or from a container.
Private network addresses are not automatically declared. Hosted providers stay outside this boundary.
Matching rules
| Rule | Behavior |
|---|---|
| Loopback | Works without a declaration |
| Matching | Exact, after case, trailing-dot, IDNA, and IP normalization |
| Rejected inputs | URLs, ports, subnets, wildcards |
| Empty or malformed endpoint | Not local |
OLLAMA_LOCAL_HOSTS provides a comma separated bootstrap until the first
Cortex save. Afterward the persisted declarations take precedence, and clearing
them does not reactivate the environment bootstrap.
Behavior
The editor shows the configured Ollama host, the effective classification, the declaration source, and the revision. Save applies to new requests without a restart. Reload, restore history into the editor, or import and export declarations as JSON. Stale saves retain unsaved input, and restoring or importing does not take effect until saved.
This control changes processing eligibility. It does not change the server URL or install models.
Chat captures the declared boundary once at preparation. Static examples, retrieved examples, approved context, accepted-draft references, polish, and the generation report all use that one decision. The report and the example preview header explain the host classification and revision.
Comparisons retain the selected boundary in their manifest. Local-only cases require local generation and local embedding processing. Each candidate rechecks current declarations before sending local-only material. Removing a host stops later candidates. It cannot recall a request already sent.
Declarations and history live at local-processing.json in the Brain data
root, with atomic replacement and a serialized revision check. This is an
explicit operator declaration, not a network ownership test or a quality
measurement.
Context budgets
Open Settings > Context budgets. The same editor opens from New task > Edit context budgets for all agents, which keeps the task form intact while you edit.
A profile can cover every provider and model, one provider, or an exact model. Exact model matches take precedence, then provider-specific matches. Inspect the saved effective budget for the selected chat model before using it.
Save, reload, history restore, and JSON import and export are available. Stale saves preserve unsaved values.
To raise limits across every engine and model at once, enter the total context estimate and reserves, select Apply limits to all agents and models, then Save all budget profiles. This copies the limits to every existing profile, including exact-model overrides, and adds a wildcard profile if none exists. The available-input figure updates as you edit. New profiles copy the wildcard profile's limits, and each profile stays individually editable for later exceptions. Nothing takes effect until saved.
What a Brain budget controls
Brain applies one allocation before every provider reasoning call, including later tool rounds. It counts the protected system instructions, active voice and lens guidance, the current request and applicable authored context, optional style examples, automatic source passages, attachments, prior dialogue, tool schemas, and the current tool exchange.
Protected material:
- The current request and authored context are preserved.
- A protected prompt that cannot fit returns an actionable error before that generation call. It does not silently cut the user's facts or constraints.
- System voice guidance stays protected even when optional examples cannot fit.
Allocation order:
- Recent dialogue receives up to one third of the remaining input allocation. Prior user exchanges stay whole and form a contiguous recent suffix.
- Remaining space goes to static examples, learned examples, and eligible reference blocks.
- A section too large to fit is omitted as a whole, which allows later smaller sections to fit.
- An attached file is one block after its attachment-specific extraction limits.
- Automatic passages are separate blocks when all automatic context has passage metadata. Legacy mixed memory output remains one block.
Tool protocol:
- Tool call arguments and call and result ids stay intact.
- Large tool results share available space and are capped at an 8,000-byte estimate per result. A shortened result contains a visible notice asking the model to obtain narrower evidence.
- If required tool protocol still cannot fit, that provider call is stopped.
- The model receives a notice when optional references or dialogue were omitted.
Estimates and reserves
These are application budgets, not advertised model capacity. The estimator counts UTF-8 bytes plus explicit message framing and tool schema serialization. It is conservative for typical text and is not an exact tokenizer.
| Default | Value |
|---|---|
| Application limit | 262,144 estimated tokens |
| Answer reserve | 2,048 |
| Protocol overhead reserve | 1,024 |
| Input available after reserves | 259,072 |
This default applies to Brain and to every worker engine when no saved profile matches. A saved limit stays authoritative until edited, so a fleet configured before 2026-09-10 keeps its earlier values until the operator applies new ones. The editor accepts totals up to 1,048,576.
Brain's Ollama calls clamp the configured application context to the actual
configured ollama_num_ctx. Hosted model profiles use the operator's
configured application limit: the application does not infer undocumented model
capacities. The answer reserve leaves input space and does not change the
provider's output generation limit.
Budgets are frozen at the first graph allocation in a Brain request. Changing them while tools run affects later requests. Older history can be omitted before newer exchanges. This deterministic order is not measured relevance ranking.
Inspect what reached the model
Open a response's generation settings. Each reasoning round reports the chosen provider and model profile and revision, the input estimate, the tool schema estimate, the reserves, and the included and omitted sections.
Source passages omitted during allocation are excluded from supplied-source counts. Attached-file records distinguish extraction from later prompt inclusion. A shortened retrieval tool result leaves per-passage inclusion unconfirmed, so its passages are not asserted as supplied evidence.
The generation summary's example and source counts represent material supplied in at least one recorded reasoning round. Inspect individual rounds for the final prompt. No causal influence percentage is inferred from these counts.
Completed turns retain each allocated application model input. Use Inspect writing turn to inspect or export it.
Worker budgets
The same profiles cover worker-owned inputs. The worker reads the active profiles once when an attempt starts and selects the profile using the engine that actually runs and the model that engine accepts.
| Engine | Budget namespace |
|---|---|
| Claude Code | Anthropic |
| Codex | OpenAI |
| Codex OSS | Ollama |
| Antigravity with a Gemini model | |
| Antigravity with a Claude model | Anthropic |
| Antigravity with an AGY-hosted GPT-OSS model | OpenAI |
Unknown explicit Antigravity families use provider-wildcard profiles. These are budget namespaces, not authentication or billing routes, so configure verified limits for each exact model. An unspecified Antigravity model retains Google wildcard-model selection. A CLI default model is unknown to the application, so only wildcard model profiles apply.
Inspect saved worker budget previews this normalization without launching a
task. Direct executors use their configured provider and model, and direct
Ollama requests set num_ctx to the chosen profile's context estimate.
If Brain cannot supply valid profiles, the attempt records an application fallback with the default limits. Saved profile changes affect later attempts.
Recover a task blocked by required context
The error Protected worker input and current action need ... means the
application stopped dispatch before launching that model call. The reported
estimate counts UTF-8 bytes and framing; it is not a tokenizer measurement.
Selected workflow skills and repository rules are protected, so even a short
task description can exceed a small input allocation. An error that still
names the former 29,696 input limit identifies an older saved profile, a
frozen attempt, or an older worker using its offline fallback.
- Open New task > Edit context budgets for all agents or Manage Cortex > Context budgets.
- Set Total context estimate so that the input left after both reserves exceeds the required-input size the error reported.
- Select Apply limits to all agents and models so older exact-model profiles move with the wildcard, then Save all budget profiles.
- Use Inspect saved worker budget with the task's engine and model to confirm the effective input allocation.
- Retry the task. A new attempt loads the saved revision without a service restart. The failed attempt keeps its old allocation record.
An older worker's offline fallback changes only with a worker code update. Keep the wildcard profile when adding an exact-model profile so other models retain shared coverage. An ongoing attempt keeps its original version.
CLI dispatch combines the persona, task, brief, handoff, approved context, voice and lens instructions, method, repository constraints, verification instructions, and optional references. Core task facts and required guidance are never silently shortened. A required prompt that exceeds the allocation stops before the provider or CLI call, so some multi-skill methods need a larger profile configured before dispatch.
Whole voice examples receive priority over automatic references. A tool loop then allocates up to one third of its remaining space to complete recent exchanges. Source evidence, past outcomes, project memory, session context, and generated plans fill remaining space in deterministic order.
The original task remains present in every tool-loop call. The current assistant action and repair instructions stay intact. Only identified tool observations can be shortened, to a shared allocation capped at an 8,000-byte estimate each.
Open a task's Context allocation for this attempt details in Cortex. Each record includes the phase, profile version, estimate, required-input size, section hashes, and inclusion decisions. Retrieved evidence and supplied inputs have distinct meanings: a retrieved block can be omitted later. CLI traces keep the exact dispatched prompt alongside the allocation record.
Native CLI private prompts, resumed history, tool schemas, and later conversation remain outside application control.
Storage is prompt-budgets.json in the Brain data root, with atomic file
replacement and versioned profiles and history.
Related lessons
- Use generation settings in chat
- Read a generation report
- Worker prompt layers
- Search embeddings offline
Native account instructions are also available in the operating-file selector. Edit only the known instruction globals with counts, preview, conflict checks and history. Native permission settings and credentials remain outside this editor. Startup hashes in attempt evidence do not prove native loading.