DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to check whether compacting at 200K actually saved money with Optimaizr

Apply the change, wait several days, then compare cost per prompt and each trade-off to the days before.

Short answer: Run optimaizr apply context-compaction; then use Claude Code or Codex normally for several days; run optimaizr results to compare the days after with the days before. All steps.

Who it is forA Claude Code or Codex user who wants proof that a context-size change cut cost before keeping it.

The problemA cost saving can come with more tool calls, errors or waiting, and it is unclear whether the change caused them.

The outcomeA before and after table where every worse row is marked as a trade-off, plus a one-command way to undo the change.

What you need first

  • Node.js 20.11 or later (22.13 or later to read opencode history)
  • Existing usage logs from Claude Code, Codex or opencode on this machine
  • A terminal

Steps

  1. Run optimaizr apply context-compaction.
  2. Use Claude Code or Codex normally for several days.
  3. Run optimaizr results to compare the days after with the days before.
  4. If the trade-offs are not worth it, run optimaizr undo context-compaction.

Prompt for your agent

In the optimaizr repo, after context compaction has been applied for several days, run `optimaizr results` on this machine and report cost per prompt before and after. Verify that every row that got worse is marked as a trade-off before you draw a conclusion.

Caveat. The README says part of any saving may already have been under way, because the baseline is the days before the change.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for blendbunjaku/optimaizr and "Check whether compacting at 200K actually saved money"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer