fix(server): provider failures say why a turn could not start #16303
Mergedsaphid(GitHub profile, opens in a new tab)merged 13 commits into
main fromrefs/pull/16303/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- packages/provider-core/src/server/failure.ts line 98OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -56,10 +81,18 @@56- message =57- "The provider conversation could not be resumed. Retry the turn; if it keeps failing, check the provider and server logs.";81+ case "ProviderAdapterProtocolError":82+ if (adapterAuthored) reason = stringField(cause, "detail");5883 break;5984 }85+ if (nextCategory !== undefined) {86+ category = nextCategory;87+ reason = undefined;88+ }89+ adapterAuthored = nextCategory !== undefined;6090 cause = (cause as Record<string, unknown>).cause;6191 } catch {6292 break;6393 }6494 }65- return message;95+ if (category === undefined) return undefined;96+ const trimmedReason = reason?.trim().replace(/[.!?]+$/u, "");97+ return trimmedReason98+ ? `${category.summary}: ${trimmedReason}. ${category.guidance}`
juliusmarminge added labelsmacroscope-review
- packages/provider-core/src/server/failure.ts line 87OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -39,19 +82,6 @@3982 case "ClaudeBackgroundWorkBlocksQueryReplacementError":4083 return stringField(cause, "message");4184 case "ContextHandoffDeliveryUncertainError":4285 return "T3 could not confirm whether conversation history reached the provider. Retry the turn to recover the session.";43- case "ProviderAdapterTurnStartError":44- message =45- "The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.";46- break;47- case "ProviderAdapterEventStreamError":48- message =49- "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.";50- break;51- case "ProviderAdapterOpenSessionError":52- message =53- "The provider session could not be opened. Check that the provider is installed and signed in, then retry the turn.";54- break;55- case "ProviderAdapterResumeThreadError":56- message =57- "The provider conversation could not be resumed. Retry the turn; if it keeps failing, check the provider and server logs.";86+ case "ProviderAdapterProtocolError":87+ if (adapterAuthored) reason = stringField(cause, "detail");
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
juliusmarminge assignedjuliusmarminge
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this300a356
juliusmarminge closed this
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed