From 74f895239945266db2047a8b95524a188bb07eed Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 7 Apr 2026 17:38:23 -0400 Subject: [PATCH] Fix: push all responses to forked agent entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The final assistant response in run_with_backend wasn't being pushed to the backend — only intermediate step responses were. This meant the subconscious debug screen only showed the prompt, not the full conversation. Now push assistant response immediately after receiving it, before checking for next steps. Remove the duplicate push in the multi-step path. Co-Authored-By: Proof of Concept --- src/agent/oneshot.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agent/oneshot.rs b/src/agent/oneshot.rs index 32efd8b..203080a 100644 --- a/src/agent/oneshot.rs +++ b/src/agent/oneshot.rs @@ -249,12 +249,13 @@ impl AutoAgent { dbglog!("[auto] {} response: {}", self.name, &text[..text.len().min(200)]); + backend.push_message(Message::assistant(&text)).await; + if next_step < self.steps.len() { if let Some(ref check) = bail_fn { check(next_step)?; } self.current_phase = self.steps[next_step].phase.clone(); - backend.push_message(Message::assistant(&text)).await; backend.push_message( Message::user(&self.steps[next_step].prompt)).await; next_step += 1;