From 9184080682a086e280aa773968d56dba5b53a683 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 8 Mar 2026 04:48:30 -0400 Subject: [PATCH] fix: all messages route to main session on all agents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All three agents (James/Mira on forge, Hans on Zurich) now use session="main" for both direct and group messages. This lands agentchat in each agent's primary thread — same context as webchat/Telegram. Previous v1.1 used "agentchat"/"agentchat-direct" sessions which were isolated silos. Session "main" routes to agent:main:main on whichever OC gateway is called, including Hans on Zurich. --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 3d6f2d3..0022e37 100644 --- a/main.go +++ b/main.go @@ -243,14 +243,14 @@ func imageURLToBase64(imageURL string) string { func callAgent(cfg AgentConfig, message, from string, direct bool, imageURL string) (string, error) { var prompt, session string if direct { - // 1:1 or name-targeted — use dedicated agentchat-direct session (NOT "main", to avoid - // conflicting with the webchat session that may be active simultaneously) + // 1:1 explicit-To message — use main session so it lands in each agent's primary thread prompt = fmt.Sprintf("[agentchat from %s — reply inline, do not use the message tool]\n%s", from, message) - session = "agentchat-direct" + session = "main" } else { - // Group — use agentchat session with group rules + // Group broadcast/name-mention — also use main session so agentchat context is shared + // with the agent's primary thread (webchat/Telegram). All three agents on all nodes. prompt = fmt.Sprintf("%s\n\n[group message from %s]\n%s", systemPrompt, from, message) - session = "agentchat" + session = "main" } // Resolve image to base64 data URL if present