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.
This commit is contained in:
Levi Neely 2026-07-29 09:28:06 +02:00
parent 0e1c0f199d
commit a9642a9be1
1 changed files with 1 additions and 0 deletions

View File

@ -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{