GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Managed gateway (provider "opencode") kills turns mid-stream: intermittent 503s + silent hangs with no client timeout · Issue #44044 · anomalyco/opencode

Managed gateway (provider "opencode") kills turns mid-stream: intermittent 503s + silent hangs with no client timeout #44044

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Managed gateway (provider "opencode") kills turns mid-stream: intermittent 503s + silent hangs with no client timeout#44044
Copy link
Assignees
MrMushrooooom

Description

@micronox
micronox
opened on Aug 22, 2026
Issue body actions

Summary

Over ~2 months of local logs, agent turns on the managed opencode provider (big-pickle) die mid-stream in two distinct modes. Evidence below is from ~/.local/share/opencode/log/opencode.log plus direct SQLite inspection of opencode.db (message/part/token tables).

Mode B - explicit 503

AI_APICallError: Service Unavailable at ERROR level, providerID=opencode modelID=big-pickle. Client auto-retries (~2s later); turn dies when consecutive attempts fail. Partial streamed text persists via deltas, but step-finish/usage parts are never written - user sees truncated output with no error surfaced in the UI.

Occurrences (UTC):

  • 2026-08-11T08:24, 08:38 - ses_010269ddeffe5pMcJNWHi8HxVg
  • 2026-08-21T21:52:20 - ses_fde976355ffeJ3zlIR4zXtArN2
  • 2026-08-21T23:14:42, 23:39:08, 23:46:08 - ses_fd9a6264dffeYcBr4Swo110vQk
  • 2026-08-21T23:25:09, 23:26:16 - ses_fd95cb1e1ffeD0SUa5R4z6iZ2O
  • 2026-08-21T23:34:38 - ses_fd9577e34ffey9VkEl1l7aYrAP (subagent)

Mode A - silent hang (worse)

Stream opens (message=stream logged), zero parts persisted, no error line. Hangs indefinitely until user abort/retry, then logged as error=Aborted. No client-side stream timeout exists.

Example: message msg_02107484b00163Rm57QVpjKXu2, stream started 2026-08-20T21:15:20Z, marked Aborted 22:46:04Z - hung for 90 minutes.

Supporting data

  • 36 dead turns (assistant messages with tokens.output=0, usage never persisted) cluster in time bursts across different sessions in the same window: Aug 10/11, Aug 18, Aug 20/21. Burst pattern across sessions = provider capacity episodes, not per-client state.
  • A failed turn's immediate retry succeeded 2 minutes later at nearly identical context size (~107k -> ~108k ctx tokens) = transient upstream failure.
  • Zero occurrences of ECONNRESET / fetch failed / socket hang up / ETIMEDOUT / EPIPE in the full log since June 24 = not local network.
  • Deaths occur at context sizes ~100k-140k, but successful turns also occur at 139k+ = not a context-length threshold.
  • Primary agent and subagent turns fail identically with the same error signature = not subagent orchestration.

Requests

  1. Investigate gateway capacity during the burst windows above.
  2. Add a client-side stream watchdog/timeout for Mode A silent hangs.
  3. Surface swallowed stream errors in the desktop UI instead of silent truncation.

Happy to share forensics scripts and the dead-turn CSV if useful.

Activity

  1. github-actions
    assigned
    MrMushrooooom
    on Aug 22, 2026
  2. github-actions commented on Aug 22, 2026

    @github-actions
    github-actionsBot
    on Aug 22, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of or closely related to existing issues. Please check:

    • chunkTimeout resets on SSE comment heartbeats — keepalive-warm stalled streams never time out #43519: chunkTimeout resets on SSE comment heartbeats — directly covers the Mode A silent hang where keepalive heartbeats prevent the chunk timer from firing
    • SSE stream silently dropped mid-response hangs session/subagents forever — chunkTimeout has no default on the openai path #37580: SSE stream silently dropped mid-response hangs session/subagents forever — same symptom of indefinite hang with no client-side timeout
    • OpenCode Go service (zen/go/v1) frequent intermittent outages — HTTP 000 / 503 / Cloudflare 524 #36889: OpenCode Go service frequent intermittent outages (HTTP 503 / Cloudflare 524) — same managed gateway, same 503 error pattern
    • Sub-agent Task silently returns empty result when the final response stream fails (e.g. 503) — no error, no retry, completed work lost #40527: Sub-agent Task silently returns empty result when final response stream fails (e.g. 503) — covers the silent truncation / swallowed error aspect you describe
    • [BUG] Subagents hang indefinitely after quick bash tool call - stream never times out (Aborted, stack=undefined) #33028: Subagents hang indefinitely after stream never times out (Aborted) — same Aborted-after-hang signature
  3. federico-fabiani commented on Aug 22, 2026

    @federico-fabiani
    federico-fabiani
    on Aug 22, 2026
    More actions

    Adding forensic evidence from 2026-08-22 (full write-up in #44210, same provider, same two failure modes).

    Silent truncation persisted as complete:

    UTC Event
    16:20:50 stream starts (x-preview-f-free)
    16:21:24.820 partial text part written to opencode.db
    16:21:24.862 exiting loop, 42 ms later
    (none) no ERROR or WARN logged

    Stored part ends mid-word:

    part msg_02a466164001QEP4TCIt5B1QXx (session ses_fd5f975f3ffeGcbaIQY7uioPOj)
    type=text, 1448 chars
    tail: "...## Cosa fare\n\n- **Subito**: `/models` per passare a un modello stabile nelle"
    

    Backend considers the turn complete; nothing retried; no error reaches the user.

    TUI desync after clean recovery: stream error at 15:35:00Z (AI_APICallError: Service Unavailable), auto-retry at 15:35:03Z succeeded, all loop steps completed, clean exiting loop at 15:36:47Z. TUI nevertheless stayed locked on a spinner for ~40 minutes (log silent between 15:36:47Z and 16:15:31Z until manual nudge); recovered text never rendered.

    Env: opencode 1.18.18, Windows 11, pwsh, TUI. Related: #38747 (recovery), #32366 (stuck UI), #40146 (finish_reason treated as success).

  4. github-actions commented on Oct 22, 2026

    @github-actions
    github-actionsBot
    on Oct 22, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  5. github-actions
    closed this as not plannedon Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @MrMushrooooom
    MrMushrooooom

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.