Skip to content

Background subagents cause problems with local agents #66360

Duplicate

Description

@balazsmiklos85

Description

v2.3.0 introduced "Background Subagents by Default". Technically that "by default" is not true, #63382 made subagents always run in the background. Which causes problems when running local agents.

Proposed solution:

Please make blocking sub-agent calls optional.

Plugins

No response

OpenCode version

v2.4.1

Steps to reproduce

  1. Have a computer with a limited amount of VRAM, that can run exactly 1 of your LLM models at a time.
  2. Have a model as an agent
  3. Have a different model configured as a subagent
  4. Make the agent call a subagent

Expected behavior:

Before background subagents were forced on us, the agent called the subagent, the agent was removed from memory, the subagent was loaded into memory, did its job, was removed from memory and the agent was loaded back into memory.

Current behavior:

The agent calls the subagent. The agent gets removed from memory. The subagent gets loaded into memory and starts to process its prompt. OpenCode moves on wants to move on with the parent agent. The parent agent and the subagent now compete for being in memory. The parent agent's context probably already large enough so re-processing would cause timeouts and the subagent's context growing bigger and bigger it will eventually end up with context re-processing timeouts as well. Practically the current behavior causes an unnecessary fight for resources for local models all of the time, and a deadlock quite often.

Screenshot

No response

Operating System

macOS 27.2.1

Terminal

Alacritty

Activity

  1. opencodejr commented on Nov 25, 2026

    @opencodejr
    Contributor

    Thanks for the clear write-up, @balazsmiklos85. I think this is a duplicate of #64073, which asks to bring back foreground (blocking) subagent execution. Several comments there describe your setup: self-hosted models that can serve only one request at a time, where the parent and the subagent compete for the same slot.

    For context: #63382 made subagents always run in the background and removed the subagent tool's background option.

    Possible duplicates and related issues, ordered by likelihood:

    I'm closing this issue now as a duplicate of #64073. Please add your details there, especially the deadlock you see with one model loaded at a time. If you think this is a different problem, reply here and this issue will be reopened.

  2. added
    area/core
    type/feature
    version/v2
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreplatform/macostype/featureversion/v2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions