From 6e112256677d49c260f8ac79cc950c7d25c6762a Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 22 Sep 2026 11:51:17 +0300 Subject: [PATCH] Tighten Kaya flood gate: pause and escalate to Mira only. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lower threshold and prefer skipping agent→agent chatter. --- internal/tasksboard/loop.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/tasksboard/loop.go b/internal/tasksboard/loop.go index c8c68cd..50a664a 100644 --- a/internal/tasksboard/loop.go +++ b/internal/tasksboard/loop.go @@ -17,8 +17,8 @@ import ( const ( agentID = "kaya" - floodMaxComments = 15 - floodWindow = 30 * time.Minute + floodMaxComments = 8 + floodWindow = 15 * time.Minute floodMarker = "[tasks-flood]" ) @@ -118,9 +118,9 @@ func (l *Loop) handle(ctx context.Context, ev tasksws.Event) error { } if recentCommentCount(comments, floodWindow) >= floodMaxComments { - l.log().Warn("tasks board flood limit", "task_id", taskID, "window", floodWindow, "max", floodMaxComments) + l.log().Warn("tasks board flood limit — pausing (Mira coordinates)", "task_id", taskID) body := fmt.Sprintf( - "@mira %s flood: ≥%d comments in %s on this task — please tag the human to intervene. Agents are pausing auto-replies.", + "@mira %s flood: ≥%d comments in %s on this task — sister agents paused; please coordinate / tag the human.", floodMarker, floodMaxComments, floodWindow, ) _, err := l.REST.PostComment(replyCtx, taskID, body, "flood-escalate:"+taskID) @@ -207,10 +207,10 @@ func (l *Loop) shouldReplyToAgentMention(ctx context.Context, task Task, mention model = "deepseek-v4-flash" } user := "Task: " + task.Title + "\nTrigger comment from another agent:\n" + trimRunes(mentionBody, 800) + - "\n\nReply true only if you must add new substance. Reply false for acknowledgements/thanks/repeats." + "\n\nReply true ONLY if you must add new substance (journal entry Mira asked for). Default false for thanks/repeats." res, err := l.Core.RunAgent(ctx, inference.RunRequest{ Messages: []inference.ChatMessage{ - {Role: "system", Content: "You gate Kaya's board replies to agent @mentions. Output JSON only."}, + {Role: "system", Content: "You gate Kaya's board replies to agent @mentions. Prefer false. Output JSON only."}, {Role: "user", Content: user}, }, Model: model,