You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local end-to-end validation of #1214 found two separate boundary defects in the provider-failure path:
Retryable provider failures lose their taxonomy after Vercel AI SDK wraps the final APICallError in AI_RetryError.
Desktop receives a safe, structured ErrorEvent.reason, but reparses only event.message, producing generic or unknown UI copy.
These are existing behavioral gaps, not regressions introduced by #1214. The extraction in #1214 remains byte-for-byte behavior-neutral and should stay separate from these fixes.
Reproduction evidence
Reproduced on 2026-07-19 from commit 44baea50 with:
The outer error exposes no top-level provider status. AI SDK keeps the final AI_APICallError in its public lastError field, but Maka currently classifies only the outer Error.
The normalizer reads statusCode, code, provider data, and response bodies from the error it receives. It does not recognize the official AI SDK retry wrapper or inspect lastError.
Both terminal event projection and telemetry use that classification, so the loss propagates into:
ErrorEvent.reason
TurnRecord / AgentRun failure taxonomy
Runtime Event Log and traces
headless provider-infrastructure accounting
Desktop presentation
This does not cause an extra retry today: AI SDK has already exhausted its retry policy, and Maka's additional transport retry remains limited to the existing Network path.
Desktop
ErrorEvent.reason is explicitly the stable machine-readable UI/telemetry routing field. sessionEventErrorMessage() ignores it and passes only new Error(event.message) into the generic redaction classifier.
That safe message is already a projection. Parsing it again is lossy: for example, Request timed out does not contain the current timeout keyword, and Provider returned an error no longer contains a 5xx status.
The failed-turn label has a separate allowlist, but it currently omits at least context_overflow and provider_billing.
Summary
Local end-to-end validation of #1214 found two separate boundary defects in the provider-failure path:
APICallErrorinAI_RetryError.ErrorEvent.reason, but reparses onlyevent.message, producing generic or unknown UI copy.These are existing behavioral gaps, not regressions introduced by #1214. The extraction in #1214 remains byte-for-byte behavior-neutral and should stay separate from these fixes.
Reproduction evidence
Reproduced on 2026-07-19 from commit
44baea50with:SessionManager -> AiSdkBackend -> ModelAdapter -> RuntimeEvent -> TurnRecordai@7.0.31OpenAI-compatible adapter1. Retry wrapper loses 429 / 503 classification
The loopback provider returned one response per request. AI SDK made three attempts for each retryable failure:
rate_limitunknownprovider_unavailableunknownA direct runtime probe showed:
The outer error exposes no top-level provider status. AI SDK keeps the final
AI_APICallErrorin its publiclastErrorfield, but Maka currently classifies only the outerError.2. Desktop discards the structured reason
The runtime correctly emitted and persisted:
The visible Desktop toast was still the generic Chinese fallback:
The same pure presentation probe currently produces:
context_overflowtimeoutprovider_billingprovider_unavailableauth/rate_limit/networkCurrent failure path
flowchart LR subgraph R["Runtime classification gap"] R1["HTTP 429 / 503"] --> R2["AI_APICallError<br/>statusCode available"] R2 --> R3["AI_RetryError<br/>lastError available"] R3 --> R4["Classify outer error"] R4 --> R5["unknown"] R3 -. "Unwrap official retry error" .-> R6["rate_limit / provider_unavailable"] end subgraph D["Desktop presentation gap"] D1["ErrorEvent<br/>reason + safe message"] --> D2["Drop reason"] D2 --> D3["Reparse safe English message"] D3 --> D4["generic toast / unknown label"] D1 -. "Allowlisted reason mapping" .-> D5["localized actionable copy"] endRoot cause
Runtime
The normalizer reads
statusCode,code, provider data, and response bodies from the error it receives. It does not recognize the official AI SDK retry wrapper or inspectlastError.Both terminal event projection and telemetry use that classification, so the loss propagates into:
ErrorEvent.reasonThis does not cause an extra retry today: AI SDK has already exhausted its retry policy, and Maka's additional transport retry remains limited to the existing
Networkpath.Desktop
ErrorEvent.reasonis explicitly the stable machine-readable UI/telemetry routing field.sessionEventErrorMessage()ignores it and passes onlynew Error(event.message)into the generic redaction classifier.That safe message is already a projection. Parsing it again is lossy: for example,
Request timed outdoes not contain the currenttimeoutkeyword, andProvider returned an errorno longer contains a 5xx status.The failed-turn label has a separate allowlist, but it currently omits at least
context_overflowandprovider_billing.Related work
Non-goals