Skip to content

Subagent tasks silently cancelled on network interface change (Wi-Fi → Ethernet) #57538

Closed as not planned

Description

@ciltocruz

Description

Running background/foreground subagent tasks are cancelled when the machine's network interface changes (e.g., switching from Wi-Fi to Ethernet). The tasks show state cancelled with no error message, and there is no way to resume them — they must be relaunched from scratch.

A brief network interface transition should not tear down in-flight subagent sessions. Expected behavior: either the session survives the transition (reconnecting transparently), or it fails with a clear error explaining what happened and offering a way to resume, instead of silently cancelling.

This happened twice: two Task tool subagents (simple counting tasks) were launched in parallel; when the user switched from Wi-Fi to Ethernet mid-run, both were cancelled. Relaunching them afterwards (on the stable Ethernet connection) completed successfully.

Plugins

No response

OpenCode version

1.18.35

Steps to reproduce

  1. Launch one or more subagent tasks via the Task tool (foreground or background).
  2. While the subagents are still running, switch the machine's network connection from Wi-Fi to Ethernet (or any interface transition that briefly interrupts connectivity).
  3. Observe that the subagent sessions transition to cancelled instead of surviving the transition or reporting a resumable failure.

Screenshot

No response

Operating System

Windows 11 (WSL2, Linux 6.18.33.2-microsoft-standard-WSL2)

Terminal

Windows Terminal (OpenCode TUI running inside WSL2)

Activity

  1. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report, @ciltocruz!

    You're on OpenCode 1.18.35, which is v1. v1 now only gets fixes for critical bugs, such as data loss, security problems, or crashes and breakage with no workaround. Here the tasks can be relaunched and then complete, so this is unlikely to be fixed in v1.

    We recommend upgrading to v2 (the @opencode/cli npm package, which provides the opencode command). v2 has a separate implementation of tasks and subagents. These related v2 issues may interest you:

    If this also happens on v2, or you think it's more critical than it looks (for example, if work is lost that can't be recovered), please reply here with the details.

  2. ciltocruz commented on Oct 20, 2026

    @ciltocruz
    Author

    Fixed in v2

  3. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as not planned. The report is about OpenCode v1 (1.18.35), which now only gets critical fixes, and relaunching the subagent tasks works around the problem. If subagent tasks also get cancelled when the network changes on v2 (@opencode/cli), please open a new issue with your v2 version and the steps, or reply here. Thanks again for the clear report, @ciltocruz!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions