prune_context
Free up context by trimming old messages when usage exceeds 70%. Works live without restart.
Instructions
Free up context by trimming old messages. Works live without restart. Use when context_status shows >70% usage. Before pruning, save any important findings with save_wisdom so they survive the trim. Typical workflow: save_wisdom → prune_context(mode:"oldest_percent", percent:40) → continue working with more room.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Pruning mode: "before_message" trims before a specific message number, "oldest_percent" trims the oldest N% of messages, "after_phrase" finds a message containing a unique phrase and makes it the new root. | |
| phrase | No | For after_phrase mode: a unique phrase to search for in the conversation. The first message containing this phrase becomes the new root, everything before it is orphaned. | |
| percent | No | For oldest_percent mode: trim this percentage of messages from the beginning (0-100). | |
| message_number | No | For before_message mode: trim everything before this message (1-indexed from chain start). The target message becomes the new root. | |
| conversation_id | No | Conversation UUID. If omitted, finds the most recently modified conversation for the current project. Your conversation ID is shown in your status bar as [xxxxxxxx]. |