fix(hooks): add null guard for tool.execute.after output (#1054)
/review command and some Claude Code built-in commands trigger tool.execute.after hooks with undefined output, causing crashes when accessing output.metadata or output.output. Fixes #1035 Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
This commit is contained in:
@@ -663,6 +663,11 @@ export function createAtlasHook(
|
||||
input: ToolExecuteAfterInput,
|
||||
output: ToolExecuteAfterOutput
|
||||
): Promise<void> => {
|
||||
// Guard against undefined output (e.g., from /review command - see issue #1035)
|
||||
if (!output) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!isCallerOrchestrator(input.sessionID)) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user