[FEATURE] Make the persistHookOutput 10K threshold configurable, not just raised
Status Open
Reported on v2.1.216
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Aug 5, 2026
Request
The 10,000-char persistHookOutput threshold (introduced v2.1.89) is hardcoded. Long-term-memory plugins need to inject far more than 10K on SessionStart and currently work around it by splitting output into N separate hook commands (each with its own 10K budget) — fragile, wasteful, and a hack that shouldn't be necessary.
Proposal — any one of:
- A
settings.jsonkey (e.g.hooks.maxAdditionalContextChars), or - An env var, or
- A CLI flag, or
- A documented escape hatch for trusted local hooks.
Why configurable (not just raised)
A fixed raise helps nobody: it either stays too small for heavy memory injection, or becomes a new ceiling we immediately hit again. A config option lets each user deliberately trade context budget vs. hook throughput, while defaults can stay conservative.
Why filing fresh
- #50571 asked for exactly this and was closed as NOT_PLANNED — but the workaround (multi-command splitting) is still required on 2.1.216, and the docs still claim a 50K threshold that the implementation doesn't honor.
- #51537 (duplicate of #50571) remains open with no resolution.
Environment: Claude Code 2.1.216, VS Code extension, macOS.