Urgent.News

What's breaking now, across thousands of outlets.

AI

I added one hook to Claude Code, and it stopped making the same mistake twice

Hooks really change the game.

I added one hook to Claude Code, and it stopped making the same mistake twice

A user of Claude Code found a way to prevent the AI from making the same mistake multiple times by adding a hook. According to XDA Developers, the user had tried including instructions in the prompt and updating the CLAUDE.md file, but the AI would still repeat its mistakes. The hook was added to make Claude revisit its mistakes and check if it had repeated any of them.

The user had installed numerous skills, agents, and commands into Claude Code, which resulted in a significant cost. As reported by Dev.to, the user had installed 107 skills, 38 agents, and 15 commands, costing 9,857 tokens per session. The user noted that the cost is not just for the skills used, but also for the descriptions of all installed skills, agents, and commands, which sit in the context window for the whole session.

The user also shared a script to calculate the cost of the Claude Code configuration before typing anything. The script, called "cc-tax," can be run against the home directory to determine the cost.

Brief written by urgent.news from XDA Developers, Dev.to — 2 reports on this story. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at xda-developers.com →

More in AI

175 Items Marked Done, Zero Delivered: An AI Agent Queue Incident

Originally published at aideazz.xyz — cross-posted here with canonical link. A newly added data source ran on schedule for a full day, logged a healthy count every hour, and delivered nothing at all…

  • 175 items marked as processed before actual handling
  • Processing cap applied after deduplication, causing flaw
  • Commit 36e985c fixed issue, implemented August 30, 2026

The guardrails that matter are code, not prompts

I built an agent that coordinates eldercare for my mother in India, and the interesting part was not the agents. It was the four times I stopped and decided what the system was not allowed to do, and…

  • Framework enforces safeguards to prevent agents from acting beyond limits
  • Deterministic layer and severity dictionary block prompt manipulation
  • Compliance with legal boundaries and tamper-proof record-keeping

More from Sunday 30 August →