Skip to content

Fork parent context into multiple subagents #22269

Closed as not planned
Closed as not planned

Description

@JaviOverflow

Question

I don't know if this is currently possible in opencode. Basically the workflow I'm trying to achieve is the following:

I have a piece of work I need to get done in several parts of the codebase, let's say is >20, the work is the same and each of those is independent
1 - I do some planning on the overall architecture and the context around that functionality
2 - then it's time to do the refactor on each of those 20 packages. Each of those is independent among themselves, but dependent to where they fit in the overall architecture/design
3 - I ask opencode to run the implementation on each of those 20 packages as different subagents, such that one subagent per package, and run in parallel

Problem is that I notice that each subagent starts from scratch, and loses the context coming from the planning phase. Is there a way to make each of those subagents fork the context from the parent (so each leverages the context from the planning phase)

Note that from a token point of view this would be very efficient, since the parent messages would be already cached, so it's virtually free to fork, only new messages in each subagent should cost money if i'm not wrong

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 13, 2026
  2. github-actions commented on Apr 13, 2026

    @github-actions
    Contributor

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

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Automated: closing question issues.

    GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.

    If this is a bug or feature request, please open a new issue with the appropriate template.

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