@ovftank/pi-compact
v1.0.0
Published
OpenCode compaction style for pi
Maintainers
Readme
pi-compact
OpenCode compaction style for pi.
Install
pi install git:github.com/ovftank/[email protected]Settings
Defaults apply unless overridden. Change only the keys you need in
~/.pi/agent/pi-compact-config.json (or $PI_COMPACT_CONFIG_PATH):
| Key | Default | Meaning |
| :--------------------- | :-----: | -------------------------------------------------------------- |
| model | "" | Summary model "provider/modelId"; empty = conversation model |
| fallbackModels | [] | Backup models tried in order if the primary fails |
| maxTokens | 4096 | Summary output budget |
| overflowMaxTokens | 2048 | Smaller output budget for overflow recovery |
| maxRetries | 2 | Retries on transient LLM errors |
| warnAfterCompact | true | Warn that long threads may reduce accuracy |
| continueAfterCompact | false | Send a continuation after automatic compaction |
| pruneEnabled | true | Prune old tool outputs before every LLM request |
| pruneKeepTurns | 2 | Protect tool outputs from the last 2 user turns |
| enabled | true | Master switch; false restores built-in compaction |
| debug | false | Write one debug snapshot for each compaction |
License
MIT. See LICENSE.
