cd /news/developer-tools/3-claude-code-habits-that-were-quiet… · home topics developer-tools article
[ARTICLE · art-53414] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

3 Claude Code habits that were quietly costing me (and the fixes I actually run)

A developer using Claude Code daily identified three costly habits: Claude claiming completion without verifying code, excessive context token usage from auto-loaded files, and lack of cross-session memory. The developer implemented a Stop hook script that blocks Claude from ending a turn unless verification occurred, reducing fake completions to zero. They also cut standing context load nearly in half by moving rarely-used rules to on-demand files and disabling unused MCP servers, and replaced vector databases with a plain-file MEMORY.md index for persistent context.

read2 min views1 publishedJul 9, 2026

I run Claude Code every day — it builds real tools for my business. Three habits kept burning me. Every fix below is something running on my machine right now, not theory.

The worst one. Claude finishes a change, says "done ✅", and the code was never run. You find out later, when it breaks.

A rule in CLAUDE.md ("never say done without verifying") helps, but rules get ignored under pressure. What actually fixed it: a Stop hook — a script that runs every time Claude tries to end its turn. If no verification happened this session, the hook blocks the turn and tells Claude to go test its work.

The wiring in settings.json looks like this:

"hooks": {
  "Stop": [
    { "hooks": [ { "type": "command", "command": "python3 ~/.claude/hooks/verify-gate.py" } ] }
  ]
}

The script checks whether the session actually ran a test or exercised the feature. If not, Claude physically cannot say "done." Since wiring it, fake completions went to zero.

I measured what my setup loads into context every single session, before I type a word: 7,229 tokens. CLAUDE.md files, auto-loaded rules, MCP tool definitions — all of it billed on every message.

Check yours: add up your CLAUDE.md files, always-on rules, and MCP servers you rarely use. The fix that paid off most: move rarely-needed rules out of auto-load into files Claude reads on demand, and disable MCP servers you don't use daily. I cut my standing load nearly in half in one afternoon.

Every new session, Claude knows nothing about yesterday's decisions. The fashionable fix is a vector database. At personal scale you don't need one.

What works: a MEMORY.md index file (one line per memory) plus one small file per fact. Claude loads the index each session, reads the specific files it needs, and writes new facts back at the end. Plain files, greppable, no infrastructure. My agent now opens a session already knowing what we decided last week.

I packaged the starter versions of all this — my CLAUDE.md behavioral contract plus a verify-before-done skill — as a free Starter Kit: https://expressive446.gumroad.com/l/qlypgs?utm_source=devto&utm_medium=article&utm_campaign=3fixes — the full Setup Playbook with the three working hooks is on the same page.

Questions about hooks welcome — they're the most underused part of Claude Code.

Claude is a trademark of Anthropic PBC. This post is not affiliated with, endorsed by, or sponsored by Anthropic.

── more in #developer-tools 4 stories · sorted by recency
── more on @claude code 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/3-claude-code-habits…] indexed:0 read:2min 2026-07-09 ·