Two-phase pruning approach based on OpenClaw's microcompact-style: - Soft Trim (30% utilization): Keep head 1500 + tail 1500 chars of large tool results - Hard Clear (50% utilization): Replace old tool results with placeholder Protections: - Never prunes before first real user message (bootstrap protection) - Protects last 3 assistant messages and their corresponding tool results - Skips image-containing tool results - Respects tool allow/deny lists Enabled by default in tokens/summary compaction modes. |
||
|---|---|---|
| .. | ||
| agent | ||
| client | ||
| console | ||
| gateway | ||
| hub | ||
| shared | ||
| index.ts | ||