From c159844b053d04de6a6cea2a0d3f0dfce691bfd6 Mon Sep 17 00:00:00 2001 From: Tibsfox Date: Mon, 6 Apr 2026 18:18:44 -0700 Subject: [PATCH] fix(gsd): show accurate pause message for queued-user-message skip Distinguish between malformed-JSON pauses and queued-user-message pauses in the notification so operators see the correct root cause. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/auto-post-unit.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/resources/extensions/gsd/auto-post-unit.ts b/src/resources/extensions/gsd/auto-post-unit.ts index 3bffee4b8..aa8555b12 100644 --- a/src/resources/extensions/gsd/auto-post-unit.ts +++ b/src/resources/extensions/gsd/auto-post-unit.ts @@ -582,11 +582,14 @@ export async function postUnitPreVerification(pctx: PostUnitContext, opts?: PreV "error", ); } else if (!triggerArtifactVerified) { - // #2883: If the artifact is missing because the tool invocation itself - // failed (malformed/truncated JSON arguments), retrying will produce the - // same failure. Pause auto-mode instead of entering a stuck retry loop. + // #2883/#3595: If the artifact is missing because the tool invocation + // failed (malformed JSON) or was skipped (queued user message), retrying + // will produce the same failure. Pause auto-mode instead of looping. if (s.lastToolInvocationError) { - const errMsg = `Tool invocation failed for ${s.currentUnit.type}: ${s.lastToolInvocationError}. Structured argument generation failed — pausing auto-mode.`; + const isUserSkip = /queued user message/i.test(s.lastToolInvocationError); + const errMsg = isUserSkip + ? `Tool skipped for ${s.currentUnit.type}: ${s.lastToolInvocationError}. Queued user message interrupted the turn — pausing auto-mode.` + : `Tool invocation failed for ${s.currentUnit.type}: ${s.lastToolInvocationError}. Structured argument generation failed — pausing auto-mode.`; debugLog("postUnit", { phase: "tool-invocation-error-pause", unitType: s.currentUnit.type, unitId: s.currentUnit.id, error: s.lastToolInvocationError }); ctx.ui.notify(errMsg, "error"); s.lastToolInvocationError = null;