OpenCode goal plugin for Codex-style goal mode, /goal slash commands, persistent objectives, and AI coding agent focus.
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
# Add to your Claude Code skills
git clone https://github.com/prevalentWare/opencode-goal-pluginGuides for using ai agents skills like opencode-goal-plugin.
Last scanned: 7/3/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@babel/core: @babel/core: Arbitrary File Read via sourceMappingURL Comment",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@opencode-ai/plugin: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@opentui/solid: Vulnerability found",
"severity": "low"
}
],
"status": "PASSED",
"scannedAt": "2026-07-03T07:21:11.296Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how opencode-goal-plugin compares with popular alternatives.
[!IMPORTANT] OpenCode 2.2.1+ includes native
/goalsupport. For most users on these versions, we recommend the built-in command, which automatically reviews progress and continues until the objective is met. No additional plugin is required.This plugin remains useful for OpenCode 1 and workflows that need its configurable token and duration budgets, goal history, checkpoints, or persistent plans with phases and tasks.
Before switching, finish or pause existing plugin goals, then remove this plugin from your server and TUI configuration to avoid overlapping
/goalcommands and continuation behavior.See the official release notes.
OpenCode Goal Plugin adds Codex-style long-running goal mode to OpenCode. It gives AI coding agents a /goal slash command, persistent goal state, completion evidence, idle continuation, and a terminal UI goal indicator so an OpenCode session can keep working toward one explicit objective until it is complete, blocked, or cleared.
If you are searching for an OpenCode goal plugin, goal mode for OpenCode, or a way to keep an OpenCode AI coding agent focused on a long-running task, this package is the npm plugin for that workflow.
Also check out OpenCode Loop Plugin, which works well alongside Goal. Goal keeps the agent focused on an objective; Loop adds recurring checks for things that change over time, such as CI results, deployments, and PR reviews.
Links:
@prevalentware/opencode-goal-pluginprevalentWare/opencode-goal-pluginopencode plugin -g @prevalentware/opencode-goal-pluginThe OpenCode Goal Plugin adds:
/goal <objective>, /pause_goal, and /resume_goal as OpenCode commands for TUI, desktop, web, and remote integrations that expose the server command catalog.get_goal, get_goal_history, list_all_goals, create_goal, set_goal, update_goal_objective, update_goal_status, update_goal, stop_goal, replace_goal, update_goal_plan, and clear_goal.complete requires verified evidence, and unmet requires a concrete blocker.session.idle / session.status, with no-progress pause and budget wrap-up safeguards.awaiting_user pauses for login, decisions, and other direct user actions; unrelated messages leave the goal paused.plan agent stay paused, and auto-continue never escapes a Plan-mode session or switches agents on its own.Use this plugin when you want OpenCode to behave more like a goal-driven coding agent instead of a one-prompt assistant. A goal stays visible, survives session compaction, can continue automatically when the session becomes idle, and can only be closed with explicit evidence or a concrete blocker.
When a goal needs a direct answer or action from you, the agent can ask and call update_goal_status({ status: "paused", reason: "awaiting_user", blocker: "..." }). This preserves the goal and stops automatic continuation. A later ordinary reply does not reactivate it by itself: the agent may resume with update_goal_status({ status: "active" }) only when your reply clearly resolves the pending request. An unrelated message leaves the goal paused. Other paused or limited goals require /goal resume or /resume_goal to continue.
Pressing Esc to interrupt an active goal also stops automatic continuation. The interrupted goal can be reopened only with /goal resume or /resume_goal; an explicit /goal stop remains terminal. A refusal that repeats across continuation turns without successful substantive tool calls pauses the goal even when the reply exceeds the token threshold. Usage events in sessions without a goal leave the state file untouched.
Common use cases:
Direct Node.js hosts require Node 22.13.0 or later in the 22.x line, or Node 23.4.0 and later, for built-in SQLite coordination. Bun hosts use bun:sqlite and do not require a separate Node runtime to run the plugin.
Choose the instructions that match the CLI you run:
| OpenCode version | How to identify it | Instructions |
|---|---|---|
| OpenCode 1 stable | You run opencode and opencode --version prints 1.x |
OpenCode 1 |
| OpenCode 2 | You run opencode2 |
OpenCode 2 |
Do not mix the configuration formats. OpenCode 1 uses plugin and tui.json; OpenCode 2 uses plugins and the global cli.json.
For goal mode across your projects, install globally:
opencode plugin -g @prevalentware/opencode-goal-plugin
The global install registers the plugin in your user configuration and avoids creating a project-local .opencode/
directory for its dependencies.
If you want the plugin only in the current project, install it from that project's directory instead:
opencode plugin @prevalentware/opencode-goal-plugin
The project install can create .opencode/ with plugin dependencies in your workspace. OpenCode detects both package
entrypoints and writes the plugin into the corresponding server and TUI config targets.
For manual installation, add the package to both V1 config files.
opencode.json:
{
"plugin": ["@prevalentware/opencode-goal-plugin"]
}
tui.json:
{
"plugin": ["@prevalentware/opencode-goal-plugin"]
}
Use this section when running opencode2. The development API packages are kept aligned, and CI checks
the CLI release pinned by @opencode/plugin in devDependencies plus the current @opencode/cli@beta channel.
Publishing requires the pinned release smoke test. OpenCode 1 remains supported.
Add the package to both V2 plugin lists:
opencode.json:
{
"plugins": ["@prevalentware/opencode-goal-plugin"]
}
~/.config/opencode/cli.json:
{
"plugins": ["@prevalentware/opencode-goal-plugin"]
}
OpenCode 2 does not read the V1 tui.json file. The server entrypoint comes from opencode.json, while the sidebar and palette integration come from ~/.config/opencode/cli.json.
Later OpenCode releases may require a compatible plugin update. V2 currently supports the goal command, tools, persistent state, usage accounting, idle continuation, Plan-mode safety, TUI sidebar/palette integration, goal compaction context, and transcript-based task recovery. Goal compaction context is injected through the V2 session.compaction hook on hosts that provide it (newer than beta-19425); on older betas the registration degrades to a no-op. After a plugin or server restart, V2 rebuilds Task-subagent deferral state by replaying each non-closed goal session's persisted transcript, because the V2 plugin context exposes no live child-session query; children that leave no finalized tool entry in the transcript are only observed through live events.
In OpenCode 1, server options use the package-and-options tuple in opencode.json:
{
"plugin": [
[
"@prevalentware/opencode-goal-plugin",
{
"auto_continue": true,
"defer_while_tasks_active": true,
"max_auto_turns": 25,
"min_continue_interval_seconds": 3,
"max_turn_time": 300,
"max_task_block_seconds": 900,
"max_prompt_failures": 3,
"locale": "zh-CN",
"default_token_budget": 200000,
"max_goal_duration_seconds": 1800,
"no_progress_token_threshold": 50,
"max_no_progress_turns": 2,
"restricted_agents": ["plan"],
"allow_goal_execution_from_plan": false,
"max_objective_chars": 100000
}
]
]
}
In OpenCode 2, use the plugin object form instead:
{
"plugins": [
{
"package": "@prevalentware/opencode-goal-plugin",
"options": {
"auto_continue": true,
"max_auto_turns": 25,
"locale": "zh-CN",
"default_token_budget": 200000,
"restricted_agents": ["plan"]
}
}
]
}
For OpenCode 1, server and TUI plugins are configured separately. To force the TUI to the same locale, use the same
option in tui.json:
{
"plugin": [
[
"@prevalentware/opencode-goal-plugin",
{
"locale": "zh-CN"
}
]
]
}
Defaults:
auto_continue: truedefer_while_tasks_active: true; when enabled, goal auto-continuation waits for active OpenCode Task child sessions and their orchestrator reconciliation before sending the next goal prompt. A deferral re-checks child sessions on a short timer, so a goal deferred by a task never depends on a further idle eventopencode-goal-plugin is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by prevalentWare. OpenCode goal plugin for Codex-style goal mode, /goal slash commands, persistent objectives, and AI coding agent focus. It has 530 GitHub stars.
Yes. opencode-goal-plugin passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/prevalentWare/opencode-goal-plugin" and add it to your Claude Code skills directory (see the Installation section above).
opencode-goal-plugin is primarily written in TypeScript. It is open-source under prevalentWare on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh opencode-goal-plugin against similar tools.
No comments yet. Be the first to share your thoughts!