AI EngineerGuide

How to configure Auto Compaction in Pi Coding Agent

by Ashik Nesin Ashik Nesin

We have full control of when the auto compaction happens in Pi coding agent.

In the settings, we can configure reserveTokens and keepRecentTokens to tune our compation behaviour

# ~/.pi/agent/settings.json
"reserveTokens": 16384
"keepRecentTokens": 20000

Trigger: tokens > window - reserveTokens

Reference

Stay Updated

Get the latest AI engineering insights delivered to your inbox.

No spam. Unsubscribe at any time.