mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
OpenCode subproviders (e.g. opencode/kimi-k2.6 on OpenCode Zen) emit session.status:retry events with messages like "Internal server error" when the upstream provider returns 5xx. opencode itself retries indefinitely with backoff and never emits a terminal event for these. Previously the adapter only surfaced retry messages on a small allowlist of "fatal" tokens (insufficient balance, invalid api key, etc.) and silently dropped everything else. The agent appeared hung from the user's perspective — no message, no spinner update, nothing — until the upstream eventually recovered or the user manually interrupted. Forward every session.status:retry as a non-terminal timeline error item so the user can see what opencode is doing, mirroring opencode's own TUI. Drop the fatal-token allowlist: classifying which retries are "really" terminal is opencode's job, and synthesizing turn_failed for ones we guess at is misleading anyway because opencode keeps spending upstream while we tell the user the agent is done. Also a small design pass on the timeline error rendering: - drop the redundant "Agent error" prefix (the message is descriptive) - drop the colored box background (visual weight too high for a retry) - align the icon vertically to the first text line (height+center) - make the message text selectable so users can copy errors