Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(daemon): emphasize NEW comment in trigger prompt to prevent session confusion
Jiang Bohan9ba9ea66f8c1
diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.goindex 6ea1b0a830..92dbe73cc2 100644--- a/server/internal/daemon/execenv/runtime_config.go+++ b/server/internal/daemon/execenv/runtime_config.go@@ -114,11 +114,11 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string {b.WriteString("- Keep responses concise and direct\n\n")} else if ctx.TriggerCommentID != "" {// Comment-triggered: focus on reading and replying- b.WriteString("**This task was triggered by a comment.** Your primary job is to respond.\n\n")+ b.WriteString("**This task was triggered by a NEW comment.** Your primary job is to respond to THIS specific comment, even if you have handled similar requests before in this session.\n\n")fmt.Fprintf(&b, "1. Run `multica issue get %s --output json` to understand the issue context\n", ctx.IssueID)fmt.Fprintf(&b, "2. Run `multica issue comment list %s --output json` to read the conversation\n", ctx.IssueID)b.WriteString(" - If the output is very large or truncated, use pagination: `--limit 30` to get the latest 30 comments, or `--since <timestamp>` to fetch only recent ones\n")- fmt.Fprintf(&b, "3. Find the triggering comment (ID: `%s`) and understand what is being asked\n", ctx.TriggerCommentID)+ fmt.Fprintf(&b, "3. Find the triggering comment (ID: `%s`) and understand what is being asked — do NOT confuse it with previous comments\n", ctx.TriggerCommentID)fmt.Fprintf(&b, "4. Reply: `multica issue comment add %s --parent %s --content \"...\"`\n", ctx.IssueID, ctx.TriggerCommentID)b.WriteString("5. If the comment requests code changes or further work, do the work first, then reply with your results\n")b.WriteString("6. Do NOT change the issue status unless the comment explicitly asks for it\n\n")diff --git a/server/internal/daemon/prompt.go b/server/internal/daemon/prompt.goindex a90de0af41..a3ec91a516 100644--- a/server/internal/daemon/prompt.go+++ b/server/internal/daemon/prompt.go@@ -30,7 +30,7 @@ func buildCommentPrompt(task Task) string {b.WriteString("You are running as a local coding agent for a Multica workspace.\n\n")fmt.Fprintf(&b, "Your assigned issue ID is: %s\n\n", task.IssueID)if task.TriggerCommentContent != "" {- b.WriteString("A user left a comment that triggered this task. Here is their message:\n\n")+ b.WriteString("[NEW COMMENT] A user just left a new comment that triggered this task. You MUST respond to THIS comment, not any previous ones:\n\n")fmt.Fprintf(&b, "> %s\n\n", task.TriggerCommentContent)}fmt.Fprintf(&b, "Start by running `multica issue get %s --output json` to understand your task, then complete it.\n", task.IssueID)