GeezerVison is showing github.com — feat(opencode): add native dynamic subagent task support by cgasgarth · Pull Request #18588 · anomalyco/opencode
Conversation
cgasgarth
commented
Mar 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
This adds native support for dynamic subagent task execution in core instead of forcing plugins to replace the task tool.
The change adds optional subagent_description, model, variant, and internal agent_config inputs to the native task flow. It also persists inline agent context on the child session's user message so resumed subagent sessions can stay on the same native path without depending on a registered config agent.
This is the core piece needed to let a plugin act as a policy layer for dynamic subagents without regressing built-in task/session behavior.
How did you verify your code works?
- Ran
bun test test/tool/task.test.ts test/session/prompt.test.ts
- Ran
bun run typecheck
- Added focused tests covering dynamic task parameters and persisted inline agent context
I also attempted a local end-to-end smoke test, but this checkout currently cannot run the local CLI end-to-end on this machine because the source runner trips over react/jsx-dev-runtime, and the local package build path is pinned to Bun 1.3.10 while this machine has 1.3.5.
Screenshots / recordings
Not a UI change.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Hey! Your PR title Add native dynamic subagent task support doesn't follow conventional commit format.
Please update it to start with one of:
feat: or feat(scope): new feature
fix: or fix(scope): bug fix
docs: or docs(scope): documentation changes
chore: or chore(scope): maintenance tasks
refactor: or refactor(scope): code refactoring
test: or test(scope): adding or updating tests
Where scope is the package name (e.g., app, desktop, opencode).
See CONTRIBUTING.md for details.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
cgasgarth
changed the title
Add native dynamic subagent task support
feat(opencode): add native dynamic subagent task support
Mar 22, 2026
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍
|
Quadina reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.