---
title: Goal — OpenCode V2 Plugin by Jad Madi (@jadmadi)
description: >-
  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.
href: /project/opencode-plugins/goal/
category: Autonomy and workflow
version: 2026.9.0
builtUnder: 2.0.16
license: MIT
repo: 'https://github.com/jadmadi/opencode-goal'
author: Jad Madi
runtime: OpenCode V2
telemetry: 0% (Local First)
installCommand: 'opencode plugin add github:jadmadi/opencode-goal'
tags:
  - goals
  - autonomy
  - judge
  - session
---
# Goal — OpenCode V2 Plugin

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.

- **Website**: https://jadmadi.net/project/opencode-plugins/goal/
- **Repository**: https://github.com/jadmadi/opencode-goal
- **Category**: Autonomy and workflow
- **Version**: v2026.9.0 (CalVer)
- **Tested Runtime**: OpenCode v2.0.16
- **License**: MIT
- **Artifact**: `goal.ts`
- **Updated**: 2026-09-25
- **Author**: [@JadMadi](https://x.com/jadmadi)

## Quick Install

Install with a single command in OpenCode V2:

```bash
opencode plugin add github:jadmadi/opencode-goal
```

### Manual / Local Install

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.

## What It Does

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.

## Slash Commands

| Command | Description |
| :--- | :--- |
| `/goal` | Set, show, or clear the judged stopping condition for this session. |

## Limitations & Safety Rules

It calls ctx.generate.text, so set GOAL_MODEL on providers that reject transient generation. Continuations are capped by GOAL_MAX (default 5).

## Frequently Asked Questions (Agent Q&A)

### Q: 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.

### Q: How do I install and run Goal?
Run `opencode plugin add github:jadmadi/opencode-goal` in your terminal.

### Q: Does this plugin transmit telemetry or code externally?
No. It operates with 0% telemetry, local-first in ~/.config/opencode/plugins/.

## Links & Resources

- Dedicated Page: https://jadmadi.net/project/opencode-plugins/goal/
- All OpenCode Plugins: https://jadmadi.net/project/opencode-plugins/
- GitHub Repository: https://github.com/jadmadi/opencode-goal
- Changelog: https://github.com/jadmadi/opencode-goal/blob/main/CHANGELOG.md
- Author Profile: https://jadmadi.net/about/
