Skip to content

Renderer crashes with TypeError: Failed to fetch when multiple background agents complete simultaneously #27440

Closed as duplicate

Description

@cy574

Description

What happened?
When launching multiple background subagents (via task(run_in_background=true)) simultaneously, the OpenCode renderer process throws a TypeError: Failed to fetch and becomes unresponsive.

The error occurs in the message polling pipeline (fetchMessages → retry → request → fetch), suggesting the Tauri IPC bridge is overwhelmed when multiple agent sessions complete at roughly the same time and their messages flood the message queue concurrently.

This is not a network issue — the agents themselves respond successfully. The renderer simply fails to fetch the messages from the backend process due to the burst load.

Stack trace

TypeError: Failed to fetch
at fetch (oc://renderer/assets/main-Dyn5r1Jq.js:102672:45)
at request (oc://renderer/assets/main-Dyn5r1Jq.js:58972:24)
at async retry (oc://renderer/assets/main-Dyn5r1Jq.js:63561:14)
at async fetchMessages (oc://renderer/assets/main-Dyn5r1Jq.js:65380:24)
at async loadMessages (oc://renderer/assets/main-Dyn5r1Jq.js:65404:7)
at async Promise.all (index 1)
at async oc://renderer/assets/main-Dyn5r1Jq.js:65562:13

Observed behavior by concurrency level

Concurrent agents Result
14 (full test) Immediate crash, TypeError: Failed to fetch
6 (subagent batch) Same crash
3 (reduced batch) Same crash

Even 3 concurrent background agents triggers the issue, suggesting the renderer's message polling lacks backpressure or throttling when multiple sessions produce messages simultaneously.

Plugins

oh-my-opencode v3.14.0 (though the bug is in OpenCode's renderer, not the plugin)

OpenCode version

1.4.49 (Tauri desktop app, installed via auto-updater)

Steps to reproduce

1、Open OpenCode desktop (Tauri mode)
2、Run the /ohmy-opencode-agent-tester slash command (oh-my-opencode skill)
3、This skill launches 14 background agents simultaneously (6 subagent_type + 8 category) with task(run_in_background=true) and prompt="ping"
4、When the agents complete and return responses, the renderer throws TypeError: Failed to fetch and becomes unresponsive

The /ohmy-opencode-agent-tester skill document itself serves as a minimal reproducible case — it is designed to test all subagent connectivity by pinging them all in parallel.

Note: Even reducing to 3 concurrent agents still triggers the same crash, so the issue is not specific to 14 agents — any concurrent background agent completion burst overwhelms the renderer's fetchMessages pipeline.

SKILL.md

Screenshot and/or share link

No response

Operating System

Windows 11 Pro 64-bit, Build 10.0.26200

Terminal

Windows Terminal (OpenCode Tauri desktop app, not terminal mode)

Activity

  1. github-actions commented on May 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review #27292 and add any additional information there if the existing report covers your situation. If your issue is distinct (e.g., different root cause or different reproduction path), please explain how it differs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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