r/opencode • • 11h ago

I brought Claude Code's /goal command to OpenCode v2 as a plugin

I made a plugin that adds Claude Code's /goal command to OpenCode v2. You give the agent a finish line like "/goal npm test passes with 0 failures" and it keeps working turn after turn until the goal is actually met, no need to keep typing "continue".

After every turn an evaluator checks the conversation and decides if the goal is met, not met or impossible. If it's not met, the agent gets the reason and keeps going on its own.

It's token efficient: the evaluator reuses the session's cached context, so each check costs little more than a short answer.

It also has safety rails (pauses when the agent stops making progress, retries on network errors, turn limit) and a status indicator in the TUI.

Tell me what you think about it and feedback is appreciated.

Here's the repo and npm package:

https://github.com/EL4CTEO/opencode-goal

https://www.npmjs.com/package/@el4cteo/opencode-goal

4 Upvotes

0 comments sorted by