docs: PostToolUseFailure error field format is undocumented (it's not just "Exit code N")

Status Fixed / completed
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Aug 2, 2026 · closed Aug 29, 2026

The hooks reference just says error is "String describing the error that occurred", no example.

What actually arrives (2.1.220, failed Bash command):

"Exit code 1\nnode:internal/modules/cjs/loader:1424\r\n  throw err;\r\n..."

So: "Exit code N", newline, then the command's full output/stack trace (CRLF on Windows). If you're parsing exit codes or hashing error text you need to know this. I shipped a parser based on the short examples and it captured nothing for weeks.

One real example payload in the docs would fix it. Same class of omission as #52607.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗