From 64848fdcbfafc52c9d86401eb658461f2f643c1f Mon Sep 17 00:00:00 2001 From: Florian Agsteiner Date: Tue, 31 Mar 2026 11:10:18 +0200 Subject: [PATCH] fix: make group chat moderator aware of participant read-write capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The moderator is always spawned in read-only/plan mode (by design — it coordinates, not writes). However, it was not told that participants have full read-write access when the user toggles read-only off. This caused the moderator to refuse file creation requests instead of delegating them to participants. Add an "Execution Mode" section to the moderator prompt that explicitly states whether participants can write files, so the moderator delegates implementation tasks appropriately. --- src/main/group-chat/group-chat-router.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/group-chat/group-chat-router.ts b/src/main/group-chat/group-chat-router.ts index 326cf6b4ce..510f9bdb3a 100644 --- a/src/main/group-chat/group-chat-router.ts +++ b/src/main/group-chat/group-chat-router.ts @@ -479,7 +479,10 @@ ${participantContext}${availableSessionsContext} ${historyContext} ## User Request${readOnly ? ' (READ-ONLY MODE - do not make changes)' : ''}: -${message}${imageContext}`; +${message}${imageContext} + +## Execution Mode: +${readOnly ? 'READ-ONLY MODE is active. You and all participants can only inspect, analyze, and plan — no file changes allowed.' : 'Participants have FULL READ-WRITE access and can create, modify, and delete files. You are in read-only/plan mode yourself, so delegate all file changes to participants. When the user asks for implementation, specs, or file creation, delegate those tasks to the appropriate participants — they can execute.'}`; // Get the base args from the agent configuration const args = [...agent.args]; @@ -516,7 +519,9 @@ ${message}${imageContext}`; console.log(`[GroupChat:Debug] Tool Type: ${chat.moderatorAgentId}`); console.log(`[GroupChat:Debug] CWD: ${os.homedir()}`); console.log(`[GroupChat:Debug] Command: ${command}`); - console.log(`[GroupChat:Debug] ReadOnly: true`); + console.log( + `[GroupChat:Debug] ReadOnly: true (moderator always read-only), participants readOnly: ${readOnly ?? false}` + ); // Spawn the moderator process in batch mode try {