Skip to content

Instantly share code, notes, and snippets.

View EmanuelFaria's full-sized avatar

Emanuel Faria EmanuelFaria

View GitHub Profile
@EmanuelFaria
EmanuelFaria / README.md
Last active March 8, 2026 23:02
Claude Code Truncation Prevention Toolkit (Fix 1: poison-the-preview, Fix 2: CLAUDE.md guardian, Fix 3: stub+lazy-load — now automatic)

Claude Code Truncation Prevention Toolkit

The Problem

Claude Code silently truncates files loaded internally at ~28KB (28,672 bytes):

  • CLAUDE.md — loaded at session start; truncated silently if >~30KB
  • commands/ files — loaded when slash command invoked; truncated silently if >~30KB
  • Skill tool output/invoke path truncates at ~30KB; PostToolUse hooks bypassed

Content loss is silent. No warning. Model sees partial content and infers the rest.