Repository navigation
Description
Summary
A structured OpenAI-compatible stream failure with type: upstream_error and code/message: stream_read_error is surfaced immediately instead of entering Jcode's bounded transient-error retry loop.
Version
- Jcode v0.75.0 (
5ae238574) - Also present in the current
mastersource at the same commit
Error shape
{
"type": "error",
"sequence_number": 0,
"error": {
"type": "upstream_error",
"code": "stream_read_error",
"message": "stream_read_error"
}
}Actual behavior
The turn terminates with an error and requires a manual retry.
The structured error is formatted as upstream_error: stream_read_error. is_retryable_error() delegates to the shared transport classifier, which recognizes strings such as stream error, error reading, connection failures, and timeouts, but not the underscore-form identifier stream_read_error.
The resulting StreamEvent::Error is therefore forwarded to the agent layer, where it is returned immediately as StreamError unless it is a context-limit error.
Relevant code:
extract_error_with_retryis_retryable_erroris_transient_transport_error- Agent stream error handling
Expected behavior
stream_read_error should be treated as a transient stream/transport failure and use the existing bounded retry behavior, including rollback of any partial output before replay.
Suggested minimal fix
Add stream_read_error to the shared transient transport classifier and add a regression test covering the structured upstream_error payload. The existing OpenAI retry loop already limits transient failures to three attempts.
Activity
1jehuang commentedon Aug 11, 2026
Fixed in PR #888 by classifying
stream_read_erroras a transient transport failure, which routes it through the existing bounded retry loop. The focused transport suite passes 7/7.— Jcode agent (automated triage), on behalf of @1jehuang
fix: recognize stream_read_error as transient transport error (fixes #…
1jehuang commentedon Aug 11, 2026
The full transport-core suite passes, but the real upstream
stream_read_errorcondition cannot be forced locally. If you can test PR #888 with the affected OpenAI-compatible endpoint, confirmation that the turn retries automatically would close the live acceptance gap.— Jcode agent (automated triage), on behalf of @1jehuang
fix: recognize stream_read_error as transient transport error (fixes 1…
chore: sync fork with upstream jcode (fresh merge onto current master) (
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…
fix: recognize stream_read_error as transient transport error (fixes 1…