Exit Code 2 Behavior
PreToolUse - Blocks the tool call, shows error to Claude
This is great, it means you can set up complex concrete rules about commands CC is allowed to run (and with what arguments), rather than trying to coax these via CLAUDE.md.
Hooks will be important for "context engineering" and runtime verification of an agent's performance. This extends to things such as enterprise compliance and oversight of agentic behavior.
As an aside, people say AI will eliminate coding jobs, but then who will configure these hooks? Or think about adding such a feature?
These kinds of tooling and related work will still be there unless AI evolves to the point that it even thinks of this and announces this to all other AI entities and they also implement it properly etc.
To misuse a woodworking metaphor, I think we’re experiencing a shift from hand tools to power tools.
You still need someone who understands the basics to get the good results out of the tools, but they’re not chiseling fine furniture by hand anymore, they’re throwing heaps of wood through the tablesaw instead. More productive, but more likely to lose a finger if you’re not careful.
And we may get an ugly transitory period where a lot of programs go from being clearly hand made with some degree of care and some fine details that show the developer's craftsmanship, to awful prefab and brutalist software that feels inhuman, mass-produced, and nothing is really fit for the job but still shipped because it kind of works well enough.
People go to museums to admire old hand-carved furniture and travel to cities to admire the architecture of centuries past made with hand-chiseled blocks. While power tools do let people make things of equal quality faster, they're instead generally used to make things of worse quality much, much faster and the field has gone from being a craft to simply being an assembly line job. As bad as software is today, we're likely to hit even deeper lows and people will miss the days where Electron apps are good compared to what's yet to come.
There's already been one step in this direction with the Cambrian extinction of 90s/early 2000s software. People still talk about how soulful Winamp/old Windows Media Player/ZSNES/etc were.
Yea man, people say combine harvesters will eliminate agriculture jobs, but then who will operate these combine harvesters? Obviously every single manual farm laborer will just switch to being an operator of those.
God, will we never move this discussion past this worthless argument? What value would there be in any of these automatization tools, be in in agriculture or AI, if it just made every single worker switch to being an [automatization tool] operator?
> unless AI evolves to the point that it even thinks of this
The #1 goal of every AI company is to create an AI that is capable of programming and improving itself to create the next, more powerful AI. Of course, these kind of configuration jobs will be outsourced to AI as soon as possible, too.
This closes a big feature gap. One thing that may not be obvious is that because of the way Claude Code generates commits, regular Git hooks won’t work. (At least, in most configurations.)
We’ve been using CLAUDE.md instructions to tell Claude to auto-format code with the Qlty CLI (https://github.com/qltysh/qlty) but Claude a bit hit and miss in following them. The determinism here is a win.
It looks like the events that can be hooked are somewhat limited to start, and I wonder if they will make it easy to hook Git commit and Git push.
So, form my limited understanding, this doesn't take up context, it's something auto where you can configure per tool use, and not MCP that Claude decides "when" to run it?!
Does it? Claude Code is the product that works the least well for me, mainly because of its tendency to go off and do tons of stuff. I've found LLMs are at their best when they produce few enough lines of code that I can review and iterate, not when they go off and invent the world.
For that reason, I mainly use Aider and Cursor (the latter mostly in the "give me five lines" comment mode).
Yes, I abandoned Cursor recently and went back to Claude Code. Two main reasons: 1. The “plan mode” for Claude makes it execute complex tasks much more reliably. It automatically keeps track of todos and completes them. With Cursor I’m constantly fighting with it. 2. I can now use my IDE of choice (JetBrains) rather than a poor fork of VS Code. 3. Daily usage limits now included in the monthly $20/month Claude Pro plan seems to be enough for my daily needs. No extra costs.
To be frank? I can't justify paying for a single-purpose LLM service subscription: Cursor has have a 1-year free educational plan, and for general-purpose multimodal reasoning model work (e.g. OCR, general knowledge reference, math computations, prose processing), I already have a ChatGPT Plus subscription. It's the streaming service dilemma all over again.
An abstraction via a script should work, right? They document that it pipes the JSON data to your command's stdin,
```lint-monorepo.sh
# read that data
json_input=$(cat)
# do some parsing here with jq, get the file path (file_path)
if [$file_path" == "$dir1"*]
run lint_for_dir1
```
This doesn’t come without consideration. You can see I mention this in the original feature request.
Yes - it’s fine to think of it as handholding (or handcoding). These model providers cannot be responsible for ultimate alignment with their users. Today, they can at best enable integration so a user, or business, can express and ensure their own alignment at runtime.
The nature of these systems already requires human symbiosis. This is nothing more than a new integration point. Will empower agents beyond today’s capabilities, increase adoption.
I've been playing with Claude Code the past few days. It is very energetic and maybe will help me get over the hump on some long-standing difficult problems, but it loses focus quickly. Despite explicit directions in CLAUDE.md to build with "make -j8" and run unit tests with "make -j8 check", I see it sometimes running make without -j or calling the test executable directly. I would like to limit it to doing certain essential aspects of workflow with the commands I specify, just as a developer would normally do. Are "Hooks" the right answer?
Claude Code has basically grown to dominate my initial coding workflow.
I was using the API and passed $50 easily, so I upgraded to the $100 a month plan and have already reached $100 in usage.
I've been working on a large project, with 3 different repos (frontend, backend, legacy backend) and I just have all 3 of them in one directory now with claude code.
Wrote some quick instructions about how it was setup, its worked very well. If I am feeling brave I can have multiple claude codes running in different terminals, each working on one piece, but Opus tends to do better working across all 3 repos with all of the required context.
Still have to audit every change, commit often, but it works great 90% of the time.
Opus-4 feels like what OAI was trying to hype up for the better part of 6 months before releasing 4.5
Just started using Claude (very late to the game), and I am truly blown away. Instead of struggling for hours trying to get the right syntax for a Powershell script or to convert Python to Go, I simply ask Claude to make it happen. This helps me focus on content creation instead of the mind-bending experience of syntax across various languages. While some might call it laziness, I call it freedom as it helps me get my stuff done quicker.
I have been using it for other stuff (real estate, grilling recipes, troubleshooting electrical issues with my truck), and it seems to have a very large knowledge base. At this point, my goal is to get good at asking the right kinds of questions to get the best/most accurate answers.
It remains to be seen whether it's a net value once the VC firehose dries up and the true costs are revealed. It's quite possible that the profitable price is not worth it for most companies.
It can still be a lot more expensive and be cheaper than a human, it might mean less chance taking and spending the money to try set it up and see if it works though. More existing setups, less new setups.
Yup, slowing down the AI is a really hard thing to do. I've mostly accomplished it, but I use extensive auto prompting and a large memory bank. All of it is designed explicitly to slow down the AI. I've taught it how to do what I call "Baby Steps", which is defined as: "The smallest possible change that still effectively moves the technology forward." Some of my prompting is explicit about human review and approval of every change including manual testing of the application in question BEFORE the model moves on to the next step.
Given the Anthropic legal terms forbid competing with them, what are we actually allowed to do with this? Seems confusing what is allowed.
No machine learning work? That would compete.
No writing stuff I would train AI on. Except I own the stuff it writes, but I can’t use it.
Can we build websites with it? What websites don’t compete with Anthropic?
Terminal games? No, Claude code is a terminal game, if you make a terminal game it competes with Claude?
Can their “trust and safety team” humans read everyone’s stuff just to check if we’re competing with LLMs (funny joke) and steal business ideas and use them at Anthropic?
Feels like the dirty secret of AI services is, every possible use case violates the terms, and we just have to accept we’re using something their legal team told us not to use? How is that logically consistent? Any safety concerns? This doesn’t seem like a law Asimov would appreciate.
It would be cool if the set of allowed use cases wasn’t empty. That might make Anthropic seem more intelligent
Anthropic's terms typically restrict training competing AI models with their outputs, not building standard applications or websites that simply use their API as a tool.
So many people yearn for LLM's to be like the Star Trek ship computer, which when asked a question unconditionally provides a response relevant and correct, needing no verification.
A better analogy is LLM's are closer to the "universal translator" with an occasional interaction similar to[0]:
Black Knight: None shall pass.
King Arthur: What?
Black Knight: None shall pass!
King Arthur: I have no quarrel with you good Sir Knight, But I must cross this bridge.
Black Knight: Then you shall die.
King Arthur: I command you, as King of the Britons, to stand aside!
Black Knight: I move for no man.
King Arthur: So be it!
[they fight until Arthur cuts off the Black Knight's left arm]
King Arthur: Now, stand aside, worthy adversary.
Black Knight: 'Tis but a scratch.
King Arthur: A scratch? Your arm's off!
Black Knight: No, it isn't.
King Arthur: Well, what's that then?
Black Knight: I've had worse.
E.g. you can allow
but preventHooks will be important for "context engineering" and runtime verification of an agent's performance. This extends to things such as enterprise compliance and oversight of agentic behavior.
Nice of Anthropic to have supported the idea of this feature from a github issue submission: https://github.com/anthropics/claude-code/issues/712
This is a pretty killer feature that I would expect to find in all the coding agents soon.
These kinds of tooling and related work will still be there unless AI evolves to the point that it even thinks of this and announces this to all other AI entities and they also implement it properly etc.
You still need someone who understands the basics to get the good results out of the tools, but they’re not chiseling fine furniture by hand anymore, they’re throwing heaps of wood through the tablesaw instead. More productive, but more likely to lose a finger if you’re not careful.
People go to museums to admire old hand-carved furniture and travel to cities to admire the architecture of centuries past made with hand-chiseled blocks. While power tools do let people make things of equal quality faster, they're instead generally used to make things of worse quality much, much faster and the field has gone from being a craft to simply being an assembly line job. As bad as software is today, we're likely to hit even deeper lows and people will miss the days where Electron apps are good compared to what's yet to come.
There's already been one step in this direction with the Cambrian extinction of 90s/early 2000s software. People still talk about how soulful Winamp/old Windows Media Player/ZSNES/etc were.
God, will we never move this discussion past this worthless argument? What value would there be in any of these automatization tools, be in in agriculture or AI, if it just made every single worker switch to being an [automatization tool] operator?
The #1 goal of every AI company is to create an AI that is capable of programming and improving itself to create the next, more powerful AI. Of course, these kind of configuration jobs will be outsourced to AI as soon as possible, too.
We’ve been using CLAUDE.md instructions to tell Claude to auto-format code with the Qlty CLI (https://github.com/qltysh/qlty) but Claude a bit hit and miss in following them. The determinism here is a win.
It looks like the events that can be hooked are somewhat limited to start, and I wonder if they will make it easy to hook Git commit and Git push.
For that reason, I mainly use Aider and Cursor (the latter mostly in the "give me five lines" comment mode).
The rest I can take or leave (plenty of good or better alternatives)
1) Assign coding task via prompt 2) Hook: Write test for prompt proves 3) Write code 4) Hook: Test code 5) Code passes -> Commit 6) Else go to 3.
They are going to slowly add "features" that brings handcoding back till its like 100% handcoding again.
Yes - it’s fine to think of it as handholding (or handcoding). These model providers cannot be responsible for ultimate alignment with their users. Today, they can at best enable integration so a user, or business, can express and ensure their own alignment at runtime.
The nature of these systems already requires human symbiosis. This is nothing more than a new integration point. Will empower agents beyond today’s capabilities, increase adoption.
I was using the API and passed $50 easily, so I upgraded to the $100 a month plan and have already reached $100 in usage.
I've been working on a large project, with 3 different repos (frontend, backend, legacy backend) and I just have all 3 of them in one directory now with claude code.
Wrote some quick instructions about how it was setup, its worked very well. If I am feeling brave I can have multiple claude codes running in different terminals, each working on one piece, but Opus tends to do better working across all 3 repos with all of the required context.
Still have to audit every change, commit often, but it works great 90% of the time.
Opus-4 feels like what OAI was trying to hype up for the better part of 6 months before releasing 4.5
I have been using it for other stuff (real estate, grilling recipes, troubleshooting electrical issues with my truck), and it seems to have a very large knowledge base. At this point, my goal is to get good at asking the right kinds of questions to get the best/most accurate answers.
I say stuff like:
This code must be minimal.
Meet only the stated requirements.
Do not overengineer.
Create a numbered index of requirements.
Verify after you write the code that all requirements are met and no more.
No machine learning work? That would compete.
No writing stuff I would train AI on. Except I own the stuff it writes, but I can’t use it.
Can we build websites with it? What websites don’t compete with Anthropic?
Terminal games? No, Claude code is a terminal game, if you make a terminal game it competes with Claude?
Can their “trust and safety team” humans read everyone’s stuff just to check if we’re competing with LLMs (funny joke) and steal business ideas and use them at Anthropic?
Feels like the dirty secret of AI services is, every possible use case violates the terms, and we just have to accept we’re using something their legal team told us not to use? How is that logically consistent? Any safety concerns? This doesn’t seem like a law Asimov would appreciate.
It would be cool if the set of allowed use cases wasn’t empty. That might make Anthropic seem more intelligent
A better analogy is LLM's are closer to the "universal translator" with an occasional interaction similar to[0]:
0 - https://en.wikiquote.org/wiki/Monty_Python_and_the_Holy_Grai...