From a9642a9be184da5789a8ddaba3c9df14e1fabdb1 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 29 Jul 2026 09:28:06 +0200 Subject: [PATCH] execute: stop streaming output to agent after process detach When a process is detached, nil out lw.stream so output no longer leaks to the agent's chat stream. Only the ring buffer captures subsequent output. --- pkg/tools/execute/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/tools/execute/server.go b/pkg/tools/execute/server.go index fe7a020..596db24 100644 --- a/pkg/tools/execute/server.go +++ b/pkg/tools/execute/server.go @@ -748,6 +748,7 @@ func (e *Server) executeWithStdin(ctx context.Context, code, language string, ti // Splice: future output goes to ring buffer instead of outputBuf. lw.mu.Lock() lw.w = ring + lw.stream = nil lw.mu.Unlock() proc := &DetachedProcess{