CLAUDE LABJP
2.1.269 — A broad release with 98 CLI changes. The one worth your attention is claude plugin eval, which finally lets you measure whether a plugin earns its placeEVAL — Every case runs three times with the plugin loaded and three times without, so the number you get back is the difference the plugin makes, not just a pass or a failGRADER — Three kinds of grader are available: a regex over the reply, a check for whether a particular tool was called, and a rubric judged by a second modelDIFF — The Bash tool result now includes a diff of the files a command changed. Turn it on with bashEditDiffEnabledSTYLE — /output-style [name] lists and switches output styles, including over Remote Control and in cloud or headless sessionsOTEL — OTEL_METRICS_INCLUDE_REPOSITORY tags metrics and events with vcs. repository attributes, and commit events carry vcs.ref.head2.1.269 — A broad release with 98 CLI changes. The one worth your attention is claude plugin eval, which finally lets you measure whether a plugin earns its placeEVAL — Every case runs three times with the plugin loaded and three times without, so the number you get back is the difference the plugin makes, not just a pass or a failGRADER — Three kinds of grader are available: a regex over the reply, a check for whether a particular tool was called, and a rubric judged by a second modelDIFF — The Bash tool result now includes a diff of the files a command changed. Turn it on with bashEditDiffEnabledSTYLE — /output-style [name] lists and switches output styles, including over Remote Control and in cloud or headless sessionsOTEL — OTEL_METRICS_INCLUDE_REPOSITORY tags metrics and events with vcs. repository attributes, and commit events carry vcs.ref.head
TAG

Token Optimization

3 articles
Back to all tags
Related:
Claude API3Agent SDK1MCP1Context Management1tool use1vision1tool_result1context editing1memory tool1agents1
API & SDK/2026-06-30Advanced

When a Tool Result Is Too Big and Melts Your Context Window: Designing Cursor-Based Pagination

When a list tool returns hundreds of rows at once, an agent's context can collapse in a single call. Here is a cursor-based pagination design that keeps tool output small and protects your token budget, with working code.

API & SDK/2026-06-29Advanced

Let Claude Actually See the Images Your Tools Return — Use Image Blocks in tool_result and Cut Tokens by Roughly 10x

Stuffing a base64 string into a tool_result makes the same image cost roughly 10–20x more tokens. Here is how to return it as an image content block instead, with SDK code, a token-cost estimate, and the gotchas I hit in production.

API & SDK/2026-06-16Advanced

Taming Token Bloat in Long-Running Agents with Context Editing and the Memory Tool

For long-running agents whose input tokens balloon as tool results pile up, here is how to pair context editing with the memory tool and measure the savings with count_tokens, including a working backend implementation.