OpenCode plugin for enhanced subtask control with return context injection and prompt chaining.
return: Append context to subtask output, ensuring the parent agent receives specific informationchain: Queue follow-up user messages that execute sequentially after the subtask completes
Add to your opencode.json:
{
"plugins": ["@openspoon/subtask2"]
}Add return and/or chain to your command frontmatter:
.opencode/command/review.md
---
description: subtask2 return and chain prompt example
agent: general
subtask: true
return: You are the agent in charge of assessing the bug review, challenge, verify and validate it, then discard it or implement it.
chain:
- Let's now rinse and repeat with PR#356, use the task tool to review it for bugs etc... then assess, challenge, validate -> discard or implement.
- Rinse and repeat, with next PR.
---
Review PR#355 for bugs, security issues, and code style problems.- When a subtask command with
returnexecutes, the return prompt is appended to the task output - When the subtask completes, each
chainprompt is sent as a user message - Chain prompts execute sequentially
MIT