From c61ed66dd34d5eae02d53702bfd8b160c83ea990 Mon Sep 17 00:00:00 2001 From: Fatih Al-Aziz Date: Mon, 3 Aug 2026 12:54:08 +0700 Subject: [PATCH] fix(agent): clarify internal steering skip message Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/agent/src/agent-loop.ts | 4 ++-- packages/agent/test/agent-loop.test.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/agent/src/agent-loop.ts b/packages/agent/src/agent-loop.ts index 409b76445..42a4b67e1 100644 --- a/packages/agent/src/agent-loop.ts +++ b/packages/agent/src/agent-loop.ts @@ -2873,8 +2873,8 @@ function createSkippedToolResult( reason = "queued user message"; blocker = "queued message"; } else if (source === "system") { - reason = "pending system advisory"; - blocker = "advisory"; + reason = "pending internal steering message"; + blocker = "steering message"; } else if (source === "irc") { reason = "pending peer interrupt"; blocker = "interrupt"; diff --git a/packages/agent/test/agent-loop.test.ts b/packages/agent/test/agent-loop.test.ts index c6e574638..496e7be47 100644 --- a/packages/agent/test/agent-loop.test.ts +++ b/packages/agent/test/agent-loop.test.ts @@ -1532,7 +1532,7 @@ describe("agentLoop with AgentMessage", () => { expect(sawInterruptInContext).toBe(true); }); - it("should skip remaining tool calls with system advisory wording when advisor steering is queued", async () => { + it("should skip remaining tool calls with internal steering wording when non-user steering is queued", async () => { const toolSchema = type({ value: "string" }); const executed: string[] = []; const tool: AgentTool = { @@ -1610,7 +1610,9 @@ describe("agentLoop with AgentMessage", () => { const skippedContent = toolEnds[1].result.content[0]; expect(skippedContent?.type).toBe("text"); if (skippedContent?.type !== "text") throw new Error("skipped tool result must be text"); - expect(skippedContent.text).toContain("Skipped due to pending system advisory"); + expect(skippedContent.text).toContain("Skipped due to pending internal steering message"); + expect(skippedContent.text).toContain("After the steering message is handled on the next step"); + expect(skippedContent.text).not.toContain("advisory"); expect(skippedContent.text).not.toContain("queued user message"); expect(skippedContent.text).toContain("Do not count this skipped result as completed work"); expect(skippedContent.text).toContain("retry the skipped tool if it is still needed");