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 — [Bug]: Renderer crashes with TypeError: Failed to fetch in fetchMessages when background subagent completes · Issue #27292 · anomalyco/opencode

[Bug]: Renderer crashes with TypeError: Failed to fetch in fetchMessages when background subagent completes #27292

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[Bug]: Renderer crashes with TypeError: Failed to fetch in fetchMessages when background subagent completes#27292
Copy link
Assignees
Brendonovich

Description

@willowite
willowite
opened on May 13, 2026
Issue body actions

Description

OpenCode GUI (Electron renderer) crashes with TypeError: Failed to fetch when a background subagent task completes and the parent session tries to fetch updated messages. The crash kills the entire session — no recovery possible without restarting OpenCode.

Environment

  • OpenCode: 1.14.48
  • OmO (oh-my-openagent): 4.1.1
  • OS: Windows 11
  • Model: claude-opus-4-6

Stack trace

TypeError: Failed to fetch
    at fetch (oc://renderer/assets/main-Cb1WDiRx.js:114735:45)
    at request (oc://renderer/assets/main-Cb1WDiRx.js:71162:24)
    at async retry (oc://renderer/assets/main-Cb1WDiRx.js:75706:14)
    at async fetchMessages (oc://renderer/assets/main-Cb1WDiRx.js:77478:24)
    at async loadMessages (oc://renderer/assets/main-Cb1WDiRx.js:77502:7)
    at async Promise.all (index 1)
    at async oc://renderer/assets/main-Cb1WDiRx.js:77660:13

Reproduction

  1. Start OpenCode TUI/GUI
  2. In a session, spawn a background task:
task(subagent_type="explore", load_skills=[], run_in_background=true,
     prompt="Return exactly: TEST")
  1. Wait for <system-reminder> notification that task completed
  2. Renderer crashes with the above stack trace
  3. Session is lost

Observations

  • The crash happens in fetchMessages → loadMessages — the renderer tries to fetch messages from the completed child session but the fetch fails
  • Backend logs (~/.local/share/opencode/log/) do NOT contain TypeError or Failed to fetch — this is purely renderer-side
  • The crash is intermittent but frequent (observed multiple times in one session)
  • Backend background task infrastructure works correctly — the task completes, result is available via API. The crash is in the UI layer consuming the completion event

Possibly related

  • [Bug] SESSION END WHEN WAIT FOR BACKGROUND TASK #26062 — SESSION END WHEN WAIT FOR BACKGROUND TASK (parent session abort)
  • [Bug] task tool causes parent session abort — both parallel and sequential dispatch #23404 — Task tool causes parent session abort
  • TaskTool returns no diagnostic context when subagent result text is empty or missing #24447 — TaskTool returns no diagnostic context when subagent result text is empty

Suggested investigation

The fetchMessages call in the renderer likely races with the session lifecycle — the child session may be cleaned up or rotated before the renderer's loadMessages call resolves. A guard or retry with session-existence check before fetch could prevent the crash.

Activity

  1. github-actions
    assigned
    Brendonovich
    on May 13, 2026
  2. cy574
    marked Renderer crashes with TypeError: Failed to fetch when multiple background agents complete simultaneously #27440 as a duplicate of this issue on May 14, 2026
  3. cy574 commented on May 14, 2026

    @cy574
    cy574
    on May 14, 2026
    More actions

    Same issue here. Can confirm this reproduces with as few as 3 concurrent background agents (not just high concurrency). The /ohmy-opencode-agent-tester skill is a one-click reproducible case.

    Test results by concurrency level — all crash:

    14 agents → crash
    6 agents → crash
    3 agents → crash
    This suggests the issue is not load-dependent but rather a missing backpressure/throttle mechanism in fetchMessages itself.

    Env: OpenCode 1.4.49, Windows 11 Pro 64-bit (Build 10.0.26200),OmO (oh-my-openagent): 4.1.1

  4. github-actions commented on Jul 14, 2026

    @github-actions
    github-actionsBot
    on Jul 14, 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 Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Brendonovich
    Brendonovich

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 01402775 — 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.