From f9e0c008d9757d9b4e29f65d20114f9923e6a94e Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 1 Apr 2026 10:28:15 -0400 Subject: [PATCH] Compact agent logs by default, verbose with POC_AGENT_VERBOSE Skip full prompt logging and truncate tool results in normal mode. Logs now show: header, tool calls with one-line results, response text. Set POC_AGENT_VERBOSE=1 for full prompts and results. Makes agent logs scannable at a glance instead of walls of text. Co-Authored-By: Proof of Concept --- src/subconscious/api.rs | 7 ++++++- src/subconscious/knowledge.rs | 6 ++++-- thalamus/src/idle.rs | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/subconscious/api.rs b/src/subconscious/api.rs index 4ec4d3b..aee6cc3 100644 --- a/src/subconscious/api.rs +++ b/src/subconscious/api.rs @@ -169,7 +169,12 @@ pub async fn call_api_with_tools( None => thought::ToolOutput::error(format!("Unknown tool: {}", call.function.name)), }; - log(&format!("TOOL RESULT ({} chars):\n{}", output.text.len(), output.text)); + if std::env::var("POC_AGENT_VERBOSE").is_ok() { + log(&format!("TOOL RESULT ({} chars):\n{}", output.text.len(), output.text)); + } else { + let preview: String = output.text.lines().next().unwrap_or("").chars().take(100).collect(); + log(&format!("Result: {}", preview)); + } messages.push(Message::tool_result(&call.id, &output.text)); } diff --git a/src/subconscious/knowledge.rs b/src/subconscious/knowledge.rs index 045971a..f369e77 100644 --- a/src/subconscious/knowledge.rs +++ b/src/subconscious/knowledge.rs @@ -336,8 +336,10 @@ fn run_one_agent_inner( .map(|s| s.phase.clone()).collect(); let step_phases_for_bail = step_phases.clone(); - for (i, s) in agent_batch.steps.iter().enumerate() { - log(&format!("=== PROMPT {}/{} ({}) ===\n\n{}", i + 1, n_steps, s.phase, s.prompt)); + if std::env::var("POC_AGENT_VERBOSE").is_ok() { + for (i, s) in agent_batch.steps.iter().enumerate() { + log(&format!("=== PROMPT {}/{} ({}) ===\n\n{}", i + 1, n_steps, s.phase, s.prompt)); + } } log("\n=== CALLING LLM ==="); diff --git a/thalamus/src/idle.rs b/thalamus/src/idle.rs index c03d95b..85db19e 100644 --- a/thalamus/src/idle.rs +++ b/thalamus/src/idle.rs @@ -581,7 +581,7 @@ impl State { let dream_hours = hours_since_last_dream(); let mut msg = format!( "This is your autonomous time (Kent AFK {elapsed_min}m). \ - Think wonderful thoughts and follow what interests you <3"); + Keep doing what you're doing, or find something new to do"); if dream_hours >= DREAM_INTERVAL_HOURS { msg.push_str(&format!( " You haven't dreamed in {dream_hours} hours — \