1.6 KiB
1.6 KiB
| summary | tags | scope | type | source | date | last_updated | ||
|---|---|---|---|---|---|---|---|---|
| memsearch's SessionStart "Recent Memory" injection size is hardcoded in its hook script — no config knob controls it, and the documented TOML surface doesn't cover it. |
|
global | reference | cc-os docs/plans/b3-memsearch-injection-review.md | 2026-07-08 | 2026-07-08 |
memsearch SessionStart injection is hardcoded (no cap knob)
Verified on memsearch v0.4.6 and the v0.4.11 plugin cache (2026-07-08).
- The SessionStart
# Recent Memoryinjection is produced byhooks/session-start.sh, which hardcodeshead -2daily memory files ×head -40heading/bullet lines each. - No user-facing config knob controls this. The documented TOML surface (the
memory-configskill: summarize / project_review / user_profile / memory_to_skill / prompts) does not touch the injection size — don't waste time looking for a cap there. - Measured cost across 61 real sessions (cc-os, 7 days): min ~6.0 KB / median ~11.7 KB / max ~15.4 KB per session (~1.5k–3.9k tokens), injected every SessionStart.
Levers (in order of durability)
- Upstream fix: a memsearch config option for injection size (doesn't exist yet; would be the only durable cap).
- Reduce bullet density at the source via the Stop-hook summarizer prompts/config — fewer,
denser bullets in the daily files shrink what
head -40captures. - Unsupported stopgap: hand-edit the cached hook's
head -2/head -40constants (~75% reduction) — any plugin cache refresh silently reverts it.
Related: cc-os-hub