WHAT NEW IN X10.30 FRI

AI collections from X · 22 collections · 60,637 posts

claudeVIDEO

Claude Code hooks setup with Jev routing for deterministic forks

The post walks through .claude/settings.json hooks that auto-run formatters and tests at edit, submit and stop points, and suggests routing deterministic forks like tool choice and retries to Jev while big models handle reasoning.

delost
@thedelostArchived 8 days agoOriginally posted 2026.10.21
delost @thedelostOriginally posted 2026.10.21
Open original on X

this is pure f*cking goldmine: Anthropic just shared one of the best tricks for Claude Code it runs your own shell commands automatically at fixed points in the session, so the checks you always forget just happen every time 1. create .claude/settings.json in your repo with a "hooks" block 2. add a PostToolUse hook matched to Edit|Write that runs your formatter on every file Claude touches 3. add a PreToolUse hook on Edit|Write that blocks writes to protected paths: exit code 2 and the edit never lands 4. add a Stop hook that runs your test suite before Claude is allowed to call the task done 5. add a UserPromptSubmit hook that drops the branch and git status into context on every prompt the whole thing is deterministic: it is your shell running, not the model choosing to JEV engineering is the same move one layer down: the forks that need no thinker (which file, which tool, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split > let Claude write the code. > let the hooks enforce the rules. > let JEV decide what deserves Claude. paste this and the prompt into Claude Code ↓ "Set up hooks in .claude/settings.json for this repo: 1. PostToolUse on Edit|Write: run my formatter on the edited file. 2. PreToolUse on Edit|Write: block writes to protected paths and exit 2. 3. Stop: run the test suite and keep me from calling it done if it fails. 4. Route fast deterministic forks (tool choice, path selection, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/hooks-guide save it, it'll come in handy

This post quotes another post: x.com/hanakoxbt/status/2112245381601878026

x.com/thedelost/status/2112641008756564360Archived 2026.10.21 10:04