Repository navigation
Replies: 1 comment
|
Confirmed with a controlled, keyless experiment on the released A local HTTP/SSE fixture returns HTTP 200, starts a response, emits a partial assistant text delta, then injects a terminal error. For single-failure cases, the next Agent request would receive a complete successful response. Each case uses a fresh DSH home/workspace and dummy credentials. Background session-title requests are counted separately and are never fault-injected; the counts below are Agent requests only.
Injected error forms, after the normal For the control, replace the latter event's error code/message with The first variant produces this terminal event: {"type":"status","phase":"turn_end","turn":1,"reason":{"kind":"error","error":{"message":"stream_read_error","code":"PI_AI_ERROR"}}}The I also inspected the As a reference, Codex CLI 0.166.0 against the same SSE fixture in a network-isolated Linux ARM64 container retries This supports adding a narrowly scoped classification/regression case rather than making every No real model endpoint, private gateway address, credentials, or user conversation data were used in the injected-fault experiment. Report prepared with AI assistance; the request counts above were measured by the local fixture. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On current
master(99f6f02fec, the rc.7 merge), an OpenAI-compatible streaming provider can terminate a response with the normalized error textstream_read_error.dsh-llm-pi-aicurrently falls through toPI_AI_ERROR, so the default LLM retry policy treats a transient mid-stream transport truncation as permanent and ends the turn without retrying.I searched the current Discussions for
stream_read_error,stream read error, pi-ai transport classification, and retry handling and did not find an existing report for this exact case.Why this is a transport failure
The failure occurs after streaming has started but before a valid terminal response event. It is the same failure family as the truncation wordings the classifier already maps to
TRANSPORT, such as a stream ending before or without its terminal event.The distinction matters because the default retryable codes include
TRANSPORT, but not the genericPI_AI_ERROR. Making allPI_AI_ERRORvalues retryable would be too broad; classifying this specific normalized wording is the narrower fix.Suggested fix
In
packages/llm/llm-pi-ai/src/stream.ts, recognize the common underscore, space, and hyphen variants:Suggested focused cases:
This should stay beside the existing pre-terminal stream-truncation classifications rather than widening the catch-all retry policy.
Upstream limitation
The pi-ai path currently reduces the original caught error to message text before the Harness classifier sees it, so the adapter cannot reliably inspect the original
codeorcause. Text classification is therefore a compatibility workaround. If pi-ai later preserves structured error metadata, the durable fix would be to route on that metadata and retire the wording heuristic.Validation
I have a local rc.7 implementation with focused classifier coverage for all three variants. The relevant test, typecheck, and build checks pass. Since this repository currently does not accept external pull requests, I am posting the minimal change here and can provide a patch in the format maintainers prefer.
All reactions