anomalyco / anomalyco/opencode

task command injects a synthetic user instruction that can override review-only scope

Open
#41,866 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Invoke Task with a review-only prompt and a non-empty command value, such as review.
  2. Have the task report a code issue.
  3. Observe that OpenCode adds the synthetic user message above.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.