From 488746f89231157ef78486394d13f08f8fa264ba Mon Sep 17 00:00:00 2001 From: Jean Brito Date: Sat, 24 Oct 2026 15:32:42 -0300 Subject: [PATCH] Scope the session.append hook to response rows cc-plugin-sec-default passes user plugins over on the attachment, hook-context and compaction doors. The hook reads only assistant rows, which come through the response door. --- hooks/register.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/register.tsx b/hooks/register.tsx index d42b45b..98d8901 100644 --- a/hooks/register.tsx +++ b/hooks/register.tsx @@ -503,7 +503,8 @@ export const register: Register = (on, options) => { }) // A server-side review tool never reaches tool.call: it shows only in the assistant's rows. - on('session.append', async ($, e, next) => { + // Only response rows carry them. A managed plugin may pass user plugins over on other doors. + on('session.append', { door: 'response' }, async ($, e, next) => { if (!e.agentId && e.message.type === 'assistant') { const a = await getArchitect($) // Consults this row opened: their result may be in the same row, after the stale read above.