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.
| Parameter | coding_fast | coding_balanced | coding_deep | general_chat | research_analyst | ops_support |
|---|---|---|---|---|---|---|
| Soft budget | 1400 | 1800 | 2400 | 1000 | 2000 | 1500 |
| Max budget | 2600 | 3500 | 4200 | 1800 | 3600 | 2800 |
| Working top-K | 5 | 6 | 8 | 4 | 6 | 6 |
| Episodic top-K | 5 | 6 | 6 | 6 | 5 | 5 |
| Semantic top-K | 5 | 7 | 9 | 5 | 10 | 7 |
| Procedural top-K | 6 | 6 | 8 | 1 | 2 | 8 |
| Promote min conf. | 0.78 | 0.80 | 0.78 | 0.85 | 0.78 | 0.80 |
| Decay days | 21 | 30 | 60 | 14 | 90 | 45 |
| Lookback days | 14 | 21 | 30 | 14 | 21 | 21 |
| Code-aware | on | on | on | off | off | on |
| Disclosure mode | summary | summary | selective | index | summary | selective |
| Prompt style | compact | balanced | rich | compact | balanced | balanced |
| Detail min score | 0.82 | 0.80 | 0.72 | 0.90 | 0.85 | 0.75 |
| Rerank profile | balanced | balanced | aggressive | balanced | aggressive | aggressive |
| Diagnostics | basic | basic | detailed | basic | basic | detailed |
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
softPromptBudgetTokensandmaxPromptBudgetTokensby 30–50%, drop each top-K by 1–2, set disclosure mode toindexorsummary. - Stop forgetting things. Raise
maxPromptBudgetTokensby 30–50%, raisesemanticTopKandretrievalLookbackDays, switch disclosure mode toselective_detail. - Tighter notebook. Lower
decayDaysto 14, raisepromotionMinConfidenceto 0.85+, leave everything else alone. - Privacy mode without fully turning off. Set
codeAwareExtractionEnabledoff, dropretrievalLookbackDaysto 7, setdiagnostics.verbositytooff. Or just pick thedisabledpreset.