3 ms·
Hooks are meant to be 'deterministic' because they are only used for executing scripts on a specific step. So, for instance, you can execute your lint on PostEd
by madamelic 5mo ago
Hooks are meant to be 'deterministic' because they are only used for executing scripts on a specific step. So, for instance, you can execute your lint on PostEdit so every time it edits a file in your project, the harness runs your linter.
With that said, part of hooks is you can return a json object to the agent which gives it instructions such as stop, continue, etc but those to my understanding are all very explicit constants rather than loosey-goosey prompts you can pass it.
If this person looked into hooks more, they could write a script that would run their project's tests and then tell Claude to stop if tests end via a non-0 exit code.