logoalt Hacker News

ericolyesterday at 10:07 PM0 repliesview on HN

Stop hooks are a world of pain.

I recently went on a deep dive about them with sonnet / opus.

I wanted to detect if a file or an analysis was the result of the last turn and act upon that.

From my experience, 2 things stand out by looking at the data above:

1. They have changed the schema for the hook reply [1] if this is real stop hook users (And may be users of other hooks) are in for a world of pain (if these schema changes propagate)

2. Opus is caring f*ck all about the response from the hook, and that's not good. Sonnet / Opus 4.6 are very self conscious about the hooks, what they mean and how they should _ act / react_ on them, and because of how complex the hook I set up is I've seen turns with 4 stop hooks looping around until Claude decides to stop the loop.

[1] My comment is in the context of claude code. I cannot make if the post is about that or an API call.