FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(opencode): preserve command scope in subtask continuation message by jaysonvirissimo · Pull Request #41874 · anomalyco/opencode · GitHub

fix(opencode): preserve command scope in subtask continuation message - #41874

Closed
jaysonvirissimo wants to merge 1 commit into
anomalyco:devfrom
jaysonvirissimo:subtask-scope
Closed

jaysonvirissimo wants to merge 1 commit into
anomalyco:devfrom
jaysonvirissimo:subtask-scope

Conversation

Copy link
Copy Markdown

Issue for this PR

Closes #41866

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The synthetic user message injected after a user-invoked subtask command says "continue with your task".
But for the/review command, that strongly suggests the model should fix any findings the subtask reported.
This is unfortunate, since when you run that command you expect it to review a PR, not try to fix everything wrong with it.

The message itself cannot be removed.
PR #5650 added it because reasoning models like Gemini error when an assistant message has no user message after it.
So this PR keeps the message but changes its text.
The new text names the command that ran, asks for a summary of the output, and defers any further action to the user.
It also restores the code comment from #5650 that explains why the message must exist.

How did you verify your code works?

  • Added tests to packages/opencode/test/session/prompt.test.ts
  • Ran the test suite
  • Ran typecheck

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

After a subtask command completes, opencode injects a synthetic user
message that says "continue with your task". The parent agent can read
this as permission to act beyond the command scope. For example, it can
start to fix findings from the review-only /review command. Change the
message to name the command and defer further action to the user. Also
restore the comment that explains why the message must exist.

Fixes anomalyco#41866

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant


Back | FazBrowse Home | New Git URL