You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fork parent context into multiple subagents #22269
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
This issue might be a duplicate of existing issues. Please check:
Feature request: let subagents inherit context #2588: Feature request to add an "inherit_context" parameter to the Task tool so subagents fork the parent thread instead of starting empty — nearly identical concept
Activity
github-actions commentedon Apr 13, 2026
This issue might be a duplicate of existing issues. Please check:
rekram1-node commentedon Jun 23, 2026
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.