diff --git a/packages/core/src/core/coreToolScheduler.test.ts b/packages/core/src/core/coreToolScheduler.test.ts index f9badb5b2bd..17fb402d7e3 100644 --- a/packages/core/src/core/coreToolScheduler.test.ts +++ b/packages/core/src/core/coreToolScheduler.test.ts @@ -13397,6 +13397,9 @@ describe('CoreToolScheduler telemetry spans', () => { expect(responseText).not.toContain( 'User intentionally cancelled this tool call. Stop', ); + expect(responseText).toContain( + 'Stop and await further instructions; do not retry or work around it.', + ); }); // A post-execution cancellation drops the model-visible output, but the diff --git a/packages/core/src/core/coreToolScheduler.ts b/packages/core/src/core/coreToolScheduler.ts index 5449cb622dd..f4380c956c6 100644 --- a/packages/core/src/core/coreToolScheduler.ts +++ b/packages/core/src/core/coreToolScheduler.ts @@ -396,7 +396,7 @@ const TOOL_SPAN_STATUS_TOOL_TIMEOUT = 'Tool execution timed out'; const TOOL_CANCELLED_BEFORE_COMPLETION_MESSAGE = 'User intentionally cancelled this tool call. Stop and await further instructions; do not retry or work around it.'; const TOOL_CANCELLED_AFTER_COMPLETION_MESSAGE = - 'The tool had already completed; its output was discarded. User intentionally cancelled. Stop and await further instructions; do not retry.'; + 'The tool had already completed; its output was discarded. User intentionally cancelled. Stop and await further instructions; do not retry or work around it.'; /** * Builds the failure ToolResult surfaced when a tool call exceeds the