Pengy asks for the whole reply in one non-streaming request, so a timeout usually means the endpoint
was busy: a single-slot llama.cpp server, a proxy whose upstream ran out of time, a slow engine
whose prefill ate the budget. Until this release that was the one failure with no recovery. The client
is built with max_retries=0 and only 429/529 were retried, so a single timeout ended the turn.
Now a 408, a 504, and the SDK's own deadline are retried on the same backoff ladder as overload
(1s, 2s, 4s, honouring Retry-After), with a budget of 3 per request. Deliberately smaller than
the 5 used for overload, because each attempt costs up to llm_timeout of wall clock and five at the
300-second default would hang a turn for about 25 minutes. Cancel is polled during every backoff
sleep, so a long chain is escapable. The context-recovery summary request gets the same budget,
because its prefill is exactly what blows the timeout on a slow engine.
Plain connection failures are not retried: refused, DNS, TLS. The endpoint is not there, and retrying only delays telling you to check whether your server is running.
The rest of the run is about not losing work. A chat whose first message fails kept a phantom chat id that saved nothing, so the chat looked present and came back empty. An agent session with no title rendered blank in the sidebar. The web UI lost the first exchange when a message failed on a brand-new chat. Mid-turn history saves are best-effort, so a failure in one does not end the turn.
One security item in 1.12.0: the API key is never in argv (it was visible in ps output to every user
on the machine), the Windows credential is protected with DPAPI, and the key is validated as ASCII
with a clear error.