Problem
_mimir_context_inject() in mimir_connector.py appends a ## Persistent Memory (Mimir) block to every rendered output when mimir.enabled=true, regardless of whether the source .md contains an @memory directive. There is no config flag to suppress this auto-injection.
Observed behavior
With mimir.enabled=true in the global config, every rendered file gets the Mimir block appended — even a secondary workspace render where the user explicitly wants a lean output. Setting mimir.context_limit: 0 in pack.yaml has no effect (see related issue: pack.yaml config not merged).
Expected behavior
Add a mimir.auto_inject: false config key that suppresses the automatic append. When false, Mimir memories are only included when an explicit @memory directive is present in the source.
Code location
src/perseus/mimir_connector.py line ~1388, _mimir_context_inject() function:
if not mcfg.get("enabled", True):
return None
Needs an additional check:
if not mcfg.get("auto_inject", True):
return None
Impact
Users with multiple render targets (e.g. primary + secondary workspace) get the Mimir block duplicated across every rendered file the runtime auto-loads.
Problem
_mimir_context_inject()inmimir_connector.pyappends a## Persistent Memory (Mimir)block to every rendered output whenmimir.enabled=true, regardless of whether the source.mdcontains an@memorydirective. There is no config flag to suppress this auto-injection.Observed behavior
With
mimir.enabled=truein the global config, every rendered file gets the Mimir block appended — even a secondary workspace render where the user explicitly wants a lean output. Settingmimir.context_limit: 0inpack.yamlhas no effect (see related issue: pack.yaml config not merged).Expected behavior
Add a
mimir.auto_inject: falseconfig key that suppresses the automatic append. When false, Mimir memories are only included when an explicit@memorydirective is present in the source.Code location
src/perseus/mimir_connector.pyline ~1388,_mimir_context_inject()function:Needs an additional check:
Impact
Users with multiple render targets (e.g. primary + secondary workspace) get the Mimir block duplicated across every rendered file the runtime auto-loads.