Repository navigation
Conversation
Some OpenRouter streams stay open for 45+ minutes. The provider timeout stops at the response headers, and Pi's idle timeout resets on every streamed byte, so one hung request can stall a whole Warden run. Bound each skill model request to 180s and end it with a retryable error, so Pi resubmits the turn (2 retries). Retried turns no longer count toward maxTurns or skew the telemetry transcript.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Looks good to me. The wall-clock deadline goes after the actual gap: the provider timeout stops at headers and Pi's idle timeout keeps resetting while a stream trickles. Ending the turn with a "timed out" error lands cleanly on Pi's isRetryableAssistantError path.
I traced the retry bookkeeping against pi-agent-core/pi-coding-agent 0.86.1. An error turn emits turn_end and then agent_end, and only after that does _prepareRetry emit auto_retry_start and drop the failed message from agent state. So discardRetriedTurn popping exactly one transcript entry and decrementing numTurns lines up with what Pi resubmits. Since the failed turn has stopReason: 'error', it can't trip the maxTurns abort before the decrement. Relying on EventStream.push ignoring events after a terminal one is also safe, so the trailing relay.fail in pipeTurn and the late abort event from the source are both no-ops.
Sets `[runner] concurrency = 12` in the repo `warden.toml`. Warden sends the diff chunks of every skill (org and repo) through one shared queue. Without this setting, the queue size is the action default of 5. On large PRs, this makes Warden review the diff in many waves, one after the other. A larger queue lets more chunks run in parallel. The org config in [getsentry/.github](https://github.com/getsentry/.github/blob/main/warden.toml) does not set `[runner] concurrency` today, so this repo value applies. If the org config sets it later, the org value wins. 12 is a starting value, we can still tweak it. This does not fix the longest Warden runs (45+ minutes). Those come from single model requests that hang, is fixed in Warden: getsentry/warden#584
A 3 minute limit also stops slow requests that finish on their own. Over 30 days, about 250 OpenRouter requests ended between 3 and 10 minutes. Of the 970 requests that ran past 10 minutes, 93% ran past 20 minutes.
Skill runs now use the timeout that runPiPrompt already supports, set to 10 minutes. A run that passes the limit fails its hunk and is not retried. This removes the stream wrapper and the Pi retry bookkeeping.
Some Pi skill runs take 45+ minutes, and one such run stalls the whole Warden run. This sets the existing Pi run timeout to 10 minutes for skill runs, so the hunk fails without a retry. Over 30 days, p99 was 2.5 minutes, and 92% of the runs that passed 10 minutes also passed 20 minutes.
Long requests in Sentry: OpenRouter requests over 20 min, last 30 days