From 2c300fb378ce88bde34b7ce5e098c2201a50389b Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Tue, 10 Feb 2026 17:09:30 -0800 Subject: [PATCH] repro: improve telemetry assertion to check stdout/stderr --- integration-tests/hooks-system.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integration-tests/hooks-system.test.ts b/integration-tests/hooks-system.test.ts index c5ac504d23..82aea8fb5f 100644 --- a/integration-tests/hooks-system.test.ts +++ b/integration-tests/hooks-system.test.ts @@ -153,10 +153,13 @@ describe('Hooks System Integration', () => { const blockHook = hookLogs.find( (log) => log.hookCall.hook_event_name === 'BeforeTool' && - log.hookCall.exit_code === 2, + (log.hookCall.stdout.includes('"decision":"deny"') || + log.hookCall.stderr.includes('"decision":"deny"')), ); expect(blockHook).toBeDefined(); - expect(blockHook?.hookCall.stderr).toContain(blockMsg); + expect( + blockHook?.hookCall.stdout + blockHook?.hookCall.stderr, + ).toContain(blockMsg); }); it('should allow tool execution when hook returns allow decision', async () => {