context-size # context-size Long conversations can quietly fill a model's context window. context-size keeps remaining context visible so you can compact, change approach, or finish a task before space becomes tight. ## Use Nothing to invoke. Start or continue a Pi session and watch the context bar in the terminal footer. Its color changes from muted to warning and then error as usage crosses your thresholds. Outside Pi's terminal UI, Pi shows a plain-text context status instead. The indicator clears when Pi cannot determine context usage. Default thresholds are 70% for warning and 85% for error. Change them only if you want earlier or later alerts: ```json { "context-size": { "warningPercent": 60, "errorPercent": 80 } } ``` Put project settings only in a trusted project because Pi ignores project settings until trust is granted. [Installation](../../README.md#install) ## Reference ### Setting names | Setting | Environment | | --- | --- | | `context-size.errorPercent` | `PI_CONTEXT_SIZE_ERROR_PERCENT` | | `context-size.warningPercent` | `PI_CONTEXT_SIZE_WARNING_PERCENT` | [Changelog](./CHANGELOG.md).