Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(kiro): stop repeating runtime brief every turn (#5605)

Xisheng Parker Zhao21613131c90d
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index f4300c353d..e87493794e 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -3504,7 +3504,7 @@ func providerDisplayName(name string) string {
func providerNeedsInlineSystemPrompt(provider string) bool {
switch provider {
- case "openclaw", "kiro", "kimi", "traecli":
+ case "openclaw", "kimi", "traecli":
return true
default:
return false
@@ -4402,8 +4402,8 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot i
// as a belt-and-suspenders for older openclaw releases until that load
// path stabilises in production; remove this once a release tracks the
// workdir bootstrap reliably end-to-end.
- // - kiro and kimi are wrapped through their own CLIs whose cwd handling
- // is opaque enough that we can't trust the file-based path either.
+ // - kimi is wrapped through its own CLI whose cwd handling is opaque
+ // enough that we can't trust the file-based path either.
// Pass the full runtime brief inline (CLI catalog + workflow steps + agent
// identity/persona + skills + project context) so the backend prepends the
// same payload that file-based runtimes pick up from disk. Without this,
@@ -4411,10 +4411,11 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot i
// `multica issue status` / `multica issue comment add`, leaving issues
// stuck in `todo`.
//
- // Hermes is intentionally excluded: ACP sessions start in the task cwd and
- // Hermes loads AGENTS.md / .agent_context itself. Prepending the full runtime
- // brief into the ACP user prompt duplicates that context, bloats every turn,
- // and has triggered upstream safety filters on harmless tasks.
+ // Hermes and Kiro are intentionally excluded: their ACP sessions start in
+ // the task cwd and load AGENTS.md themselves. Kiro documents root AGENTS.md
+ // as always included, and a real kiro-cli 2.13.0 ACP smoke confirms it.
+ // Prepending the full runtime brief into the ACP user prompt duplicates that
+ // context and bloats every turn.
if providerNeedsInlineSystemPrompt(provider) {
execOpts.SystemPrompt = runtimeBrief
}
diff --git a/server/internal/daemon/daemon_test.go b/server/internal/daemon/daemon_test.go
index e1fd4b392d..8ec9ae96c5 100644
--- a/server/internal/daemon/daemon_test.go
+++ b/server/internal/daemon/daemon_test.go
@@ -484,7 +484,9 @@ func TestProviderNeedsInlineSystemPrompt(t *testing.T) {
// directly. Inlining the full runtime brief duplicates that context and
// can trip upstream provider safety filters on otherwise harmless tasks.
{provider: "hermes", want: false},
- {provider: "kiro", want: true},
+ // Kiro CLI loads a root AGENTS.md in ACP sessions. Inlining the same
+ // runtime brief duplicates it at the start of every user turn.
+ {provider: "kiro", want: false},
{provider: "kimi", want: true},
{provider: "traecli", want: true},
{provider: "codex", want: false},