Skip to content

Commit f362c62

Browse files
committed
docs: document system_prompt_injection and keep_subagents config keys
Both are in the schema (and thus accepted/validated) but were missing from CONFIGURATION.md, so users had no reference for them: - system_prompt_injection — the escape hatch to opt agents out of Magic Context's system-prompt augmentation (global enabled:false, or per-agent via skip_signatures substrings). Verified against system-prompt-hash.ts. - keep_subagents — the debug flag that preserves spawned child sessions (historian/dreamer/sidekick/memory-migration) for inspection. Descriptions taken from the schema (source of truth) and the injection behavior confirmed at source. All 24 top-level schema keys are now documented.
1 parent faf2db6 commit f362c62

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

CONFIGURATION.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ Higher-tier models with longer cache windows benefit from a longer TTL. Setting
109109
| `historian_timeout_ms` | `number` | `300000` | Timeout per historian call (ms). |
110110
| `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. |
111111
| `commit_cluster_trigger` | `object` | See below | Controls the commit-cluster historian trigger. |
112+
| `system_prompt_injection` | `object` | See below | Controls whether and where Magic Context augments the system prompt; lets you opt specific agents out. |
113+
| `keep_subagents` | `boolean` | `false` | Debug: keep the child sessions Magic Context spawns for its own subagents (historian, dreamer, sidekick, memory-migration) instead of deleting them on success, so their full transcript stays in the host session store for inspection. Kept sessions accumulate until cleared manually — leave `false` for normal use. |
112114
| `sqlite` | `object` | See below | Per-connection SQLite tuning for Magic Context's own `context.db`. |
113115

114116
### `language`
@@ -145,6 +147,22 @@ A **commit cluster** is a distinct work phase where the agent made one or more g
145147

146148
Set `enabled: false` to disable this trigger entirely and rely only on pressure-based and tail-size triggers for historian.
147149

150+
### `system_prompt_injection`
151+
152+
Controls whether and where Magic Context augments the system prompt (its guidance block plus the surrounding project-docs and user-profile blocks). OpenCode's internal hidden agents — `title`, `summary`, and `compaction` — are always skipped automatically; this section lets you opt out additional agents, or disable injection globally.
153+
154+
```jsonc
155+
{
156+
"system_prompt_injection": {
157+
"enabled": true, // default: true
158+
"skip_signatures": ["<!-- magic-context: skip -->"] // default
159+
}
160+
}
161+
```
162+
163+
- **`enabled`** — when `false`, NO injection happens for ANY agent. Global escape hatch; Magic Context's transform and compaction still run, but nothing is added to the system prompt.
164+
- **`skip_signatures`** — substring opt-out list. If an agent's system prompt contains any of these strings, Magic Context skips ALL injection for that call. Use it to exempt a specific custom agent by putting the signature (e.g. the default `<!-- magic-context: skip -->`) in that agent's prompt.
165+
148166
### `sqlite`
149167

150168
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.

0 commit comments

Comments
 (0)