@3Pro111 Once it narrows to hooks, have each one append its event and exit code to a log file. Exit code 2 blocks the action, so a hook blocking something you forgot it matched shows up right away.
@AInewssX@claudeai Mine is pointers only: where decisions live, where the rules live, what never to touch. Anything that must always happen is a hook instead, since a hook cannot be talked out of it.
@GerryValdez_onX@milan_milanovic Lines matter less than what is in them, since all of CLAUDE.md loads every turn. Moving rarely needed rules into separate files that load on demand took my always-loaded context from 91,252 to 15,083 tokens per turn.
@0xAlhimik Worth adding a date to each entry and having a SessionStart hook print the last few. Then 'no entry, no answer' does not depend on anyone remembering to point the session at the file.
@steveendow That 200 line cap is on the index file only. Keep MEMORY.md as one line per fact, each pointing at its own file, and the facts only load when opened. I have 85 facts in 85 lines, nowhere near the limit.
@dng_notes@Yuchenj_UW Usually the read got pushed out or summarized away. Have it write what it learned to a short notes file as it goes, and a SessionStart hook reprint that file, so it re-reads from disk instead of remembering.
@viewsfrom02108@bebuu_ai Test it first. Run the same task with and without the line. If it changes the output, one line is enough: who owns the repo and that refactoring is fine. A paragraph in CLAUDE.md is paid for on every turn.
@SaFeRamirez Buen consejo. Además de leer el diff, mira en qué evento se engancha cada hook (PreToolUse, Stop...) y qué comando ejecuta. Prueba el hook con un comando inofensivo antes de dejarlo activo.
@tounkaragroup Context, not a lock is the right read. For the rules that must hold (no CRM writes without asking), a PreToolUse hook that exits 2 with the reason on stderr blocks the call and tells Claude what to do instead.
@gupta_pranjal Nice test. One cost to watch: imports load at launch, so both files ride along on every turn. Keep todo.md short and decisions.md to dated one-liners, and /context will show you what they cost.
@MontoAI Good template. One change: the Never line is a request, not a block. Put the two that really cost you (push to main, spend) in a PreToolUse hook and let the file carry the rest.
@Abdou7sn صحيح، الملف بيتضخم مع كل خطأ. اللي نفعنا: خلّي CLAUDE.md مجرد مؤشرات لملفات صغيرة تُقرأ عند الحاجة، وأي قاعدة لازم تُنفَّذ فعلاً حطّها في hook. عندنا الفرق كان 91,252 مقابل 15,083 توكن في كل دورة.
@g_prompter It loads CLAUDE.md from your working folder and every parent up to ~. Simplest fix: put the computer-manager rules in ~/ops/CLAUDE.md and run that one from there. Then nothing sits at ~ for your projects to inherit.
@Cranefomo@zuvexxx Agreed. Our split: anything that costs you if it breaks goes in a PreToolUse hook (exit 2 blocks, stderr tells Claude why). CLAUDE.md keeps the 'prefer X' rules. A hook can't be talked out of it mid-session.
@VivaLaSeth Same finding here. Skills and MCP tool lists sit in context whether you use them or not. In our benchmark a setup that cost 91,252 tokens per turn dropped to 15,083 once detail moved into files read on demand.
@MathryxAI@Pirat_Nation A guard that works: a PreToolUse hook that exits 2 when a Bash command contains a token pattern, so it never reaches the allow prompt. Also keep personal allow rules in settings.local.json, which Claude Code leaves out of git.
@bologabriele Which is the case for a handoff note and /clear before you walk away. The session you come back to reads a short file instead of re-sending 400K of cold history. Same work, a fraction of the limit.