Commit 1eadb90
Fix Stop hook example prompt to prevent JSON parsing failures
The anti-rationalization Stop hook example uses a prompt hook evaluated
by Haiku. Without an explicit formatting constraint, Haiku wraps the
JSON response in markdown code fences or adds explanatory text, which
fails JSON parsing and silently breaks the hook.
Fix the example prompt to prepend a JSON-only output instruction and
add a timeout. Document the pitfall so others don't hit it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent df8374d commit 1eadb90
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
| 321 | + | |
| 322 | + | |
320 | 323 | | |
321 | 324 | | |
322 | 325 | | |
| |||
0 commit comments