New Claude Context Management

Automatic deletion of tool calls.

Looks like I didn't have to wait long for more movement in the area of automatic context management: Anthropic has released Claude Sonnet 4.5, now with context management built into the model API.

Managing context on the Claude Developer Platform on 2025-09-29:

Context editing automatically clears stale tool calls and results from within the context window when approaching token limits. As your agent executes tasks and accumulates tool results, context editing removes stale content while preserving the conversation flow, effectively extending how long agents can run without manual intervention.

Digging into the documentation, it looks like you can trigger the cleanup based on the number of tokens in the context, or based on the total number of tool calls. There are also configuration parameters around keeping certain kinds of tool call, and whether to clear out both tool inputs and outputs.