You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: remove stale compressor config stanza (#204)
The LLM-compressor subsystem was deleted with the historian v2 decay-render
rewrite, and the JSON schema no longer accepts a `compressor` key — so IDEs
validating against the schema flag the stanza CONFIGURATION.md still documented.
Remove the compressor row and section, and reunite the commit_cluster_trigger
field table (stranded below the compressor section) with its own section.
Copy file name to clipboardExpand all lines: CONFIGURATION.md
+7-58Lines changed: 7 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,6 @@ Higher-tier models with longer cache windows benefit from a longer TTL. Setting
110
110
|`history_budget_percentage`|`number` (0.05–0.5) |`0.15`| Fraction of usable context (`context_limit × execute_threshold`) reserved for the history block. Triggers compression when exceeded. |
111
111
|`commit_cluster_trigger`|`object`| See below | Controls the commit-cluster historian trigger. |
112
112
|`sqlite`|`object`| See below | Per-connection SQLite tuning for Magic Context's own `context.db`. |
113
-
|`compressor`|`object`| See below | Controls the background compressor that merges older compartments when the history block exceeds its budget. |
114
113
115
114
### `language`
116
115
@@ -139,6 +138,13 @@ A **commit cluster** is a distinct work phase where the agent made one or more g
139
138
}
140
139
```
141
140
141
+
| Field | Type | Default | Description |
142
+
|-------|------|---------|-------------|
143
+
|`enabled`|`boolean`|`true`| Enable commit-cluster based historian triggering. |
144
+
|`min_clusters`|`number`|`3`| Minimum number of commit clusters in the unsummarized tail before historian fires. The tail must also contain at least one `trigger_budget` worth of tokens, where `trigger_budget = main_context × execute_threshold × 5%` clamped to `[5K, 50K]`. |
145
+
146
+
Set `enabled: false` to disable this trigger entirely and rely only on pressure-based and tail-size triggers for historian.
147
+
142
148
### `sqlite`
143
149
144
150
Per-connection PRAGMAs applied to Magic Context's own `context.db` at open. These tune SQLite's runtime behaviour only — they do not change the schema or what is stored, and they do not touch OpenCode's or Pi's databases.
@@ -157,63 +163,6 @@ Per-connection PRAGMAs applied to Magic Context's own `context.db` at open. Thes
157
163
158
164
Separately, Magic Context runs `PRAGMA optimize` (bounded by `PRAGMA analysis_limit=400`) on its 15-minute maintenance tick. This is self-gating — it re-analyses a table only when its row count has drifted enough to matter — so the query planner keeps choosing good indexes as the database grows. There is no config knob for it.
159
165
160
-
### `compressor`
161
-
162
-
Compressor is a background pass that runs when the rendered `<session-history>` block exceeds its budget. It merges older compartments using progressively aggressive **caveman-style** compression at each depth level, enforcing style consistency via a deterministic post-process after the historian LLM call. Each compartment range can be compressed at most `max_merge_depth` times.
163
-
164
-
**Depth tiers** (applied progressively as compartments are re-compressed):
165
-
166
-
| Depth | Style | What happens |
167
-
|---|---|---|
168
-
| 1 |**Merge only**| Preserve narrative and all U: lines. Drop only duplicates spanning compartments. |
169
-
| 2 |**Lite caveman**| Drop filler words (just, really, basically) and hedging. Keep grammar. |
170
-
| 3 |**Full caveman**| Drop articles (the, a, an), weak auxiliaries. Fragments OK. Single paragraph per compartment. |
| 5 |**Title-only collapse**| Content cleared (no LLM call). Raw messages recoverable via `ctx_expand`. |
173
-
174
-
Inspired by the [caveman Claude Code skill](https://github.com/JuliusBrussee/caveman) which validated telegraph-style compression as LLM-friendly (and saves tokens without tokenizer fallback issues that character-dropping causes).
| 4 → 5 | — | Title-only collapse (no LLM, recoverable via `ctx_expand`) |
198
-
199
-
**Selection strategy:** The compressor picks the oldest contiguous run of compartments that share the SAME rounded compression depth (up to `max_compartments_per_pass`). This progresses naturally: depth-0 bands get compressed first → depth-1 bands compressed next → and so on. Each run goes through one LLM call.
200
-
201
-
**Floor protection:** The compressor never reduces your session's compartment count below `ceil(total_raw_messages / min_compartment_ratio)`. For a 20K-message session with the default ratio, that's a floor of 20 compartments.
202
-
203
-
**Grace period:** The newest `grace_compartments` compartments are always excluded from compression. This protects freshly-published historian output from being re-compressed before it has been used. Default is 10, which works well even for long autonomous runs that publish many compartments per hour.
204
-
205
-
**Ordinal snap:** When the LLM drifts by ±1-2 ordinals on merged boundaries (e.g. outputs `start=8161` when the actual input boundary is `8160`), the runtime snaps those values to the enclosing input compartment's canonical boundary rather than rejecting the whole pass. Snaps are logged for observability.
206
-
207
-
**Disable entirely:** Set `compressor.enabled: false` to skip all background compression. Older sessions will simply carry a larger history footprint.
208
-
209
-
210
-
| Field | Type | Default | Description |
211
-
|-------|------|---------|-------------|
212
-
|`enabled`|`boolean`|`true`| Enable commit-cluster based historian triggering. |
213
-
|`min_clusters`|`number`|`3`| Minimum number of commit clusters in the unsummarized tail before historian fires. The tail must also contain at least one `trigger_budget` worth of tokens, where `trigger_budget = main_context × execute_threshold × 5%` clamped to `[5K, 50K]`. |
214
-
215
-
Set `enabled: false` to disable this trigger entirely and rely only on pressure-based and tail-size triggers for historian.
216
-
217
166
### `execute_threshold_tokens`
218
167
219
168
An absolute-tokens alternative to `execute_threshold_percentage`. Useful when you want a hard cap expressed in tokens rather than a percentage — for example, when a provider limits effective prompt size below its advertised context window.
0 commit comments