Discover · thecrazyprogrammer.com

Context Engineering for AI Agents: 4 Techniques to Cut Token Costs

The Crazy Programmer thecrazyprogrammer.com

There’s a failure mode in agent systems that never shows up as an error. The agent works well for twenty turns, then gets subtly worse — forgets a constraint from earlier, repeats a tool call it already made, contradicts something it said. No exception, no alert, no obvious cause.

What happened is that context filled up and something had to go. The question is whether you decided what went, or whether a default did.

More ways to use this
Open on another device
Scan this QR code to open the same public page

Scan to open this page. Your saved notes and account access are not included.

Download QR code

Open the page link

Names and references

  1. Engineering — person

In the piece

Keep going

Each of these is read from what this estate already kept: the feed a piece came through, the publisher behind it, the credits and topics the publisher printed. None of it is a recommendation, an identity or a record kept anywhere else.

More like this

Also from The Crazy Programmer

  1. Building Social Proof: A Guide for Developers & Tech CreatorsNeeraj Mishra thecrazyprogrammer.com
  2. How to Vibe Code a SaaS Tool: A Step-by-Step GuideNeeraj Mishra thecrazyprogrammer.com
  3. How Developers Can Build Smarter Applications With AI Voice AgentsNeeraj Mishra thecrazyprogrammer.com
  4. Overcoming The Challenges Faced When Testing Your Applications From End To EndNeeraj Mishra thecrazyprogrammer.com
  5. How to Bring SQL Database Out of Emergency Mode | Complete GuideNeeraj Mishra thecrazyprogrammer.com
  6. Essential Cybersecurity Tools Every Developer Should Use in 2026Neeraj Mishra thecrazyprogrammer.com