fix(reply): name the stalled request when handing its guidance to a newer message

This commit is contained in:
Ayaan Zaidi 2026-09-30 11:26:03 +05:30
parent c8a2682be6
commit 313f58aeea
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -168,7 +168,6 @@ describe("runReplyAgent stalled turn continuation", () => {
const recovery = drainedRuns.mock.calls[0]?.[0];
expect(recovery?.stalledTurnRecovery).toBe(true);
expect(recovery?.prompt).toContain("previous turn stopped making progress");
expect(recovery?.prompt).toContain("Answer the user's outstanding request now");
// Replay safety: the inbound request is not re-sent or re-persisted.
expect(recovery?.run.suppressNextUserMessagePersistence).toBe(true);
expect(recovery?.transcriptPrompt).toBeUndefined();

View file

@ -6,8 +6,9 @@ import type { ReplyOperation } from "./reply-run-registry.js";
export const STALLED_TURN_NOTICE_TEXT =
"⚠️ This turn was interrupted because it stopped making progress. Please try again.";
export const STALLED_TURN_GUIDANCE =
"Your previous turn stopped making progress and was stopped before you replied. " +
"Answer the user's outstanding request now from what the transcript already contains. " +
"Your previous turn stopped making progress and was stopped before you replied, so the " +
"user's request from that turn is still unanswered. Answer it now, together with any newer " +
"message, from what the transcript already contains. " +
"Keep further tool use to a minimum, do not repeat actions that already ran, and briefly " +
"say what you could not verify.";