cd /news/developer-tools/claude-code-and-codex-have-a-nasty-h… · home topics developer-tools article
[ARTICLE · art-74236] src=promptcube3.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Claude Code and Codex have a nasty habit of treating your

A new open-source tool called Qarinah reduces LLM coding agent context from over 442k tokens to about 5.6k tokens—a 98% reduction—by treating project knowledge as typed events with explicit relations like supersedes or blocks, rather than relying on standard RAG embeddings. The tool, created by AjnasNB, integrates with Codex and Claude Code to provide structured, evidence-linked memory that prevents agents from using deprecated or superseded information.

read2 min views1 publishedJul 26, 2026
Claude Code and Codex have a nasty habit of treating your
Image: Promptcube3 (auto-discovered)

Why standard RAG fails coding agents #

Most people think a bigger window or basic embeddings solve memory. They don't. Embeddings find "similar" text, but similarity isn't the same as authority. A snippet from a deprecated README is "similar" to your current task, but it's functionally a lie. You need to know if a newer decision superseded an old one, and you need a citation to prove it.

Qarinah treats project knowledge as "typed events" (decisions, approvals, tool outcomes) with explicit relations like supersedes or blocks. Instead of dumping the whole history into the prompt, it builds a compact, evidence-linked pack specifically for the task at hand.

Real-world performance #

The math on this is actually wild. In an evaluator covering things like TS refactoring and production debugging, the input context dropped from over 442k tokens to about 5.6k. That's a ~98% reduction in repeated context. While your actual bill won't drop by exactly 98% (thanks to output tokens and caching), it's a massive win for speed and accuracy.

AI workflow: Getting it running #

If you want to stop the token bleed, here is the practical tutorial for setting it up.

  1. Install and init in your project:
npm install --save-dev qarinah
npx qarinah init . --capture content
npx qarinah scan
npx qarinah doctor
  1. Record a decision so the agent doesn't ask you for the 50th time:
npx qarinah record --kind decision \
 --title "Use additive database migrations" \
 --body "Add, backfill, switch, then remove. Never rename a production column in place."

Integrating with your tools #

You can plug this directly into your LLM agent setup. It stays local, so you aren't up your whole repo to some random backend.

For Codex:

codex plugin marketplace add AjnasNB/qarinah --ref v0.1.1
codex plugin add qarinah@qarinah

For Claude Code:

claude plugin marketplace add AjnasNB/[email protected] --scope user
claude plugin install qarinah@qarinah --scope user

This turns your project memory into a structured database rather than a giant, expensive scroll of text. Your wallet (and your agent's sanity) will thank you.

Next PWA Caching: Why I'm skeptical of standard Service Workers →

── more in #developer-tools 4 stories · sorted by recency
── more on @qarinah 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/claude-code-and-code…] indexed:0 read:2min 2026-07-26 ·