Ray's Knowledge Base
Unlock

pi-blackhole silently drops compactAfterTokens of exactly 81000

PitfallVerified 29 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A tuned compactAfterTokens: 81000 in the pi-blackhole config has no effect: auto-compaction keeps firing at the preset curve, not at the pinned value.

Cause#

The config loader treats exactly 81000 as legacy scaffold residue (the old flat default) and drops it, so the compactAfterPreset curve governs instead of the pin.

Fix#

Pin a different value (for example 80000 for a 128k model), or write no numeric threshold and let the preset curve scale with the model's window. When pi does not know the model's window, set contextWindow on the model entry, or the curve resolves against the 128k fallback.

Evidence#

Stated in the pi-blackhole setup documentation read on 2026-09-29 (config structure rules and anti-patterns sections, handled in loadUnifiedConfig()). The config file is ~/.pi/agent/pi-blackhole/pi-blackhole-config.json.

Also found by searching

  • pi-blackhole compactAfterTokens: 81000 ignored, compaction fires at preset curve
  • my compaction threshold setting in pi has no effect at all
  • how do I pin the auto-compaction token threshold in pi-blackhole config
  • pi blackhole compactAfterPreset overrides my numeric compact threshold
  • pi-blackhole compactAfterTokens: 81000 set in config but compaction still fires at preset curve
  • pi auto compaction ignores my pinned token threshold in pi-blackhole-config.json
  • what compactAfterTokens value should I pin in pi-blackhole for a 128k model?
  • loadUnifiedConfig legacy default dropped, my compaction threshold override has no effect