GC
10 min read·Updated 2026-04-13

Memory Tuning

Every memory parameter explained, every preset value side-by-side, and recipes for the most common tuning needs. Read the main Memory page first.

Read this when the presets are not enough

This page is for when the seven presets are not quite right and you want to tune memory by hand. It walks through every knob in Settings → Memory, tells you what it does, and shows you the value each preset sets it to so you can copy from the closest one and adjust.

If you have not read the main Memory page yet, start there. This page assumes you already know what the four buckets are and what a preset is.

Token budgets

These two numbers are the upper limit on how much memory the bot is allowed to load into the prompt at the start of a turn. They are measured in tokens.

Soft budget

The target. The bot tries to keep memory at or below this size on every turn. It will trim less important notes first to stay under it. Default: 1800.

softPromptBudgetTokens

Max budget

The hard ceiling. The bot will never load more memory than this, no matter what. Anything past this is dropped. Default: 3500.

maxPromptBudgetTokens

Lower these to keep prompts shorter and cheaper at the cost of recall. Raise them when the bot keeps forgetting things mid-conversation. The presets cluster around 1000–2400 soft / 1800–4200 max.

Top-K per bucket

Each bucket has a top-K — the maximum number of notes the bot will pull from that bucket on a single turn. The buckets are independent, so you can be generous with one and stingy with another.

Working

Notes about the current task. Cleared when the task ends. Default: 6. Lower for short chats; raise for long autonomous runs.

workingTopK

Episodic

Dated events from past sessions. RuntimeConfig default: 8; coding_balanced: 6. Raise for research work where past observations matter; lower if old notes are noisy.

episodicTopK

Semantic

Stable facts about the project, the tools, your preferences. RuntimeConfig default: 6; coding_balanced: 7. Raise this when accumulated knowledge is the main thing that matters.

semanticTopK

Procedural

How-to notes: fixes, commands, recipes. RuntimeConfig default: 4; coding_balanced: 6. Raise for ops-style work that benefits from replaying what worked; lower for chat.

proceduralTopK

Promotion

Promotion is when the bot moves a note out of the dated episodic bucket and into the long-term semantic bucket because it has seen the same fact a few times and is now confident the fact is stable.

Enabled

Turns promotion on or off. Default: on. Turn it off if you want every note to stay where it was first written.

promotionEnabled

Min confidence

How sure the bot has to be before it promotes a note. Range 0–1. RuntimeConfig default: 0.75; coding_balanced: 0.80. Raise it for stricter promotion; lower it to promote more aggressively.

promotionMinConfidence

Decay and retrieval lookback

Decay is the bot aging out old notes so the notebook does not grow forever. After a note has not been touched for a while it becomes eligible for removal.

Enabled

Turns decay on or off. Default: on. Turn it off if you want notes to live forever.

decayEnabled

Decay days

How many days a note can sit untouched before it ages out. Default: 30. Raise it for projects where old context is still useful; lower it for a tighter notebook.

decayDays

Retrieval lookback

How far back the bot will look when searching past episodic notes. Default: 21 days. Independent of decay — controls retrieval, not deletion.

retrievalLookbackDays

Code-aware extraction

Code-aware extraction tells the bot to pay extra attention to logs, errors, stack traces, and commands when it decides what to remember from a turn. Useful for coding and ops work; less useful for casual chat.

Code-aware extraction

Default: on for the three coding presets, ops_support, and disabled. Off for general_chat and research_analyst. Leave it on unless you mostly chat in plain prose or accumulate narrative research notes.

codeAwareExtractionEnabled

Disclosure

Disclosure controls how the bot shows memory in the prompt itself. There are four modes from terse to verbose, and the bot can always pull more detail on demand if it needs to.

Mode

How memory shows up in the prompt. "index" lists titles only, "summary" adds one line each, "selective_detail" expands the most relevant ones, "full_pack" inlines everything.

disclosure.mode

Prompt style

Visual density of the rendered memory section. "compact", "balanced", or "rich". Most presets use "balanced" or "compact".

disclosure.promptStyle

Tool expansion

Lets the bot ask for more detail on a single note mid-turn through a tool call. On for every preset except general_chat and disabled — leave it on unless the prompt budget is really the bottleneck.

disclosure.toolExpansionEnabled

Disclosure hints

Tells the bot in the prompt that more detail is available if it asks. Off if you want a strict, fixed prompt.

disclosure.disclosureHintsEnabled

Detail min score

In selective_detail mode, the minimum relevance score before a note's detail snippet is included. Range 0–1. Default: 0.80. Raise it for tighter selection.

disclosure.detailMinScore

Reranking

Reranking is a second pass that the bot does after the first-pass scoring, to refine which notes are picked before the budget is applied. It is on in every preset except disabled.

Enabled

Turns the second-pass reranking on or off. Default: on. Off only if you want the cheapest possible retrieval and accept rougher ordering.

reranking.enabled

Profile

How hard the rerank pass works. "balanced" is the default; "aggressive" spends more compute on closer ordering — used by coding_deep, research_analyst, and ops_support.

reranking.profile

Diagnostics verbosity

Diagnostics verbosity controls how much memory telemetry shows up in the diagnostics page and the runtime log. Useful when you are tuning and want to see what the bot picked.

Verbosity

How much memory telemetry surfaces. "off" hides it, "basic" shows summary counts, "detailed" prints per-note scoring. Default: basic.

diagnostics.verbosity

Preset comparison table

Side-by-side values for the seven presets. Use this to spot the closest match to what you want, then copy from it and adjust the one or two parameters that are off.

Parametercoding_fastcoding_balancedcoding_deepgeneral_chatresearch_analystops_support
Soft budget140018002400100020001500
Max budget260035004200180036002800
Working top-K568466
Episodic top-K566655
Semantic top-K5795107
Procedural top-K668128
Promote min conf.0.780.800.780.850.780.80
Decay days213060149045
Lookback days142130142121
Code-awareonononoffoffon
Disclosure modesummarysummaryselectiveindexsummaryselective
Prompt stylecompactbalancedrichcompactbalancedbalanced
Detail min score0.820.800.720.900.850.75
Rerank profilebalancedbalancedaggressivebalancedaggressiveaggressive
Diagnosticsbasicbasicdetailedbasicbasicdetailed

The disabled preset is not in the table. It is a fully minimized profile: the master enabled flag is off, and on top of that it sets disclosure.mode to index, promptStyle to compact, toolExpansionEnabled, disclosureHintsEnabled, and reranking.enabled all to false, and diagnostics.verbosity to off. The top-K and budget fields stay at the coding_balanced values but nothing reads them while memory is off.

Tuning recipes

A few common adjustments. Pick the closest preset, then change just these fields.

  • Make it cheaper. Lower softPromptBudgetTokens and maxPromptBudgetTokens by 30–50%, drop each top-K by 1–2, set disclosure mode to index or summary.
  • Stop forgetting things. Raise maxPromptBudgetTokens by 30–50%, raise semanticTopK and retrievalLookbackDays, switch disclosure mode to selective_detail.
  • Tighter notebook. Lower decayDays to 14, raise promotionMinConfidence to 0.85+, leave everything else alone.
  • Privacy mode without fully turning off. Set codeAwareExtractionEnabled off, drop retrievalLookbackDays to 7, set diagnostics.verbosity to off. Or just pick the disabled preset.

What to do next