anomalyco / anomalyco/opencode
task command injects a synthetic user instruction that can override review-only scope
@jlongster is already working on this.
Since Aug 11, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Task calls with a command create a synthetic user message after the subtask completes:
Summarize the task tool output above and continue with your task.
This is injected unconditionally in packages/opencode/src/session/prompt.ts when task.command is present.
For a command representing review-only work, this can be interpreted as permission to implement a reported fix. The command's original scope is not carried into the continuation, and the injected text appears as a user instruction even though the user did not send it.
Expected: command-specific scope remains authoritative. A review command should result in a review summary, not an imperative continuation that can authorize edits. The runtime should omit this message, make it non-instructional, or include an explicit scope-preserving continuation.
Related: #33044 also concerns synthetic continuation messages, but this is a command-semantics issue.
Plugins
Custom review command / task wrapper.
OpenCode version
1.18.16
Steps to reproduce
- Invoke
Taskwith a review-only prompt and a non-emptycommandvalue, such asreview. - Have the task report a code issue.
- Observe that OpenCode adds the synthetic user message above.
- The next turn has an imperative instruction to “continue,” without preserving the review-only constraint; an agent may edit the worktree to fix its review finding.
Screenshot and/or share link
None.
Operating System
macOS
Terminal
OpenCode CLI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.