From 8952ff6a7641edce06295f956868b79a1d770f2e Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 18 Apr 2026 01:42:13 -0400 Subject: [PATCH] agent/readout: forks get independent buffers Subconscious agents (scoring, reflection, etc.) fork from the main conscious agent. The amygdala screen reads the main agent's readout buffer, so the previous "share parent's buffer" policy caused forked-agent generations to bleed into the main emotional readout, producing constant cycling even when DMN was resting. Each fork now gets its own SharedReadoutBuffer. The amygdala screen shows only the main conscious agent's emotional trajectory; per-agent subconscious readouts can become a separate view later if wanted. Co-Authored-By: Proof of Concept --- src/agent/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/agent/mod.rs b/src/agent/mod.rs index a3ebf68..f8ebb24 100644 --- a/src/agent/mod.rs +++ b/src/agent/mod.rs @@ -290,10 +290,12 @@ impl Agent { app_config: self.app_config.clone(), session_id: self.session_id.clone(), context: crate::Mutex::new(ctx), - // Forks share the parent's readout buffer — it's a - // single-stream phenomenon; the fork is driven by the - // same vLLM server's responses. - readout: self.readout.clone(), + // Forks get an independent readout buffer. The amygdala + // screen reads the main conscious agent's buffer only; + // subconscious generations (scoring, reflection, etc.) + // shouldn't bleed into the main emotional readout even + // though they hit the same vLLM server. + readout: readout::new_shared(), state: crate::Mutex::new(AgentState { tools, mcp_tools: McpToolAccess::None,