Goal
Sets a judged stopping condition per session: at turn end a separate judge decides whether the goal is met, and the plugin continues with a nudge or gives up at a cap.
Quick Answer & Overview
Goal is an open-source (MIT) OpenCode V2 plugin by @JadMadi. It resolves: An agent decides it is done on its own, so a stopping condition needs an independent check to avoid ending early or running away.. Installed via opencode plugin add github:jadmadi/opencode-goal, it operates locally with 0% telemetry.
opencode plugin add github:jadmadi/opencode-goal Local manual setup:
Copy goal.ts into ~/.config/opencode/plugins/ and restart the TUI.
The Problem It Solves
An agent decides it is done on its own, so a stopping condition needs an independent check to avoid ending early or running away.
Slash Commands
| Command | Description & Usage |
|---|---|
/goal | Set, show, or clear the judged stopping condition for this session. |
Design Guardrails & Limitations
It calls ctx.generate.text, so set GOAL_MODEL on providers that reject transient generation. Continuations are capped by GOAL_MAX (default 5).
Technical Specifications
- Target Host
- OpenCode V2 (CLI & TUI)
- Tested Runtime
- OpenCode
v2.0.16(builtUnder-2.0.16) - Artifact File
goal.ts- Version Scheme
- CalVer (YYYY.MM.MICRO) · Current:
v2026.9.0 - Default Install Path
~/.config/opencode/plugins/goal.ts- License
- MIT (Open Source)
- Last Updated
- 2026-09-25
Frequently Asked Questions
What problem does Goal solve?
An agent decides it is done on its own, so a stopping condition needs an independent check to avoid ending early or running away.
How do I install Goal in OpenCode V2?
Run the terminal command: `opencode plugin add github:jadmadi/opencode-goal`. The runtime clones the repository into `~/.config/opencode/plugins/goal.ts` and activates it in your next session. Alternatively: Copy goal.ts into ~/.config/opencode/plugins/ and restart the TUI.
What are the guardrails and limitations for Goal?
It calls ctx.generate.text, so set GOAL_MODEL on providers that reject transient generation. Continuations are capped by GOAL_MAX (default 5).
What slash commands does Goal provide?
/goal (Set, show, or clear the judged stopping condition for this session.)