Native asynchronous subtasks now available [experimental]
I was looking at options to have true non-blocking subtasks without installing oh-my-bloat or some similar framework and as I was digging through the repo I came across the environmental variable
OPENCODE_EXPERIMENTAL_BACKGROUND_AGENTS
Wondering how I totally missed this in a previous exploration of the code and finding searches yielded no useful info I looked into PRs and found it was merged 10 days ago:
https://github.com/anomalyco/opencode/pull/27084
I've been trying it out, and haven't encountered any issues. Since there really isn't much in the way of documentation here are a couple items of interest:
- It modifies available task parameters to add 'background' with a default of false
- You need to instruct your model to use it (ie in AGENTS.md or your prompt.)
- It is currently not integrated into custom command parsing [big gap IMHO]. You can specify model and subtask for a custom command, but not background. My workaround has been to change the command to not setup as a subtask and make the instruction be 'Delegate this prompt exactly to @AGENT as a background subtask' - annoying because the whole prompt shows up in your main conversation.
Anyone else using this and have any tips/tricks/insights?