Menu

OpenCode 2.2.1 Goal Progress Review: How the New /goal System Transforms AI Agent Workflows

OpenCode 2.2.1 Goal Progress Review: How the New /goal System Transforms AI Agent Workflows

OpenCode v2.2.1, released on October 29, 2026, introduces a paradigm shift in how AI coding agents manage task continuity with its headline feature: goal-oriented persistent execution. The /goal command enables an agent session to operate autonomously toward a defined objective, pausing only when it requires human review to confirm completion. Rather than fragmenting complex development tasks into a series of disconnected prompts, developers can now define a goal once and let the agent iterate until the outcome meets expectations.

What the /goal System Actually Does

The /goal command is accessible from both the terminal UI (TUI) and the desktop application. When a developer types /goal <objective>, the session enters a persistent work mode. The agent will continue processing tasks, making decisions, and executing actions aligned with the stated objective. It automatically submits progress for review at checkpoints, but it does not terminate arbitrarily — the session remains active until a human reviewer explicitly confirms that the goal has been met.

This marks a departure from the conventional request-response loop common in AI coding assistants. In a typical workflow, each prompt produces one discrete output, and the developer must manually chain together subsequent instructions. The goal system collapses that sequence into a single sustained execution cycle. Developers retain control through three companion commands: /goal pause to temporarily halt progress, /goal resume to continue from where it left off, and /goal clear to abandon the objective entirely. The TUI displays goal status directly below the prompt, while the desktop app surfaces goal controls and state information through its activity interface.

How Progress Review Works in Practice

The progress review mechanism is the operational backbone of the goal system. Rather than running blindly, the agent periodically surfaces its current state for evaluation. The review trigger appears to be tied to natural completion checkpoints within the task graph — after a sub-task finishes or when the agent determines it has reached a point worth validating. The reviewer (typically the developer who initiated the session) can then assess whether the output aligns with the intended objective.

If the reviewer confirms the goal is met, the session concludes. If not, the agent incorporates any feedback and resumes work. This creates a feedback loop that resembles agile sprint reviews compressed into a single session. The key difference from manual prompting is that the agent maintains full context throughout — it remembers prior steps, understands what has been attempted, and can adjust its approach without losing state.

For product teams evaluating this feature, the value proposition hinges on context preservation. Long-running development tasks such as refactoring a module, implementing a multi-file feature, or debugging a distributed issue often span dozens of interactions in traditional workflows. Each interaction risks context degradation as the conversation window fills. The goal system mitigates this by structuring work around a persistent objective, where the agent's internal state remains coherent across review cycles.

Supporting Infrastructure: Schedules, Shells, and Model Selection

OpenCode v2.2.1 bundles several complementary enhancements that strengthen the goal execution environment. Scheduled prompts, enabled through the /schedule command and the experimental.schedules configuration, allow developers to program recurring check-ins or trigger actions at defined intervals. An agent working toward a long-running goal could, for instance, schedule a daily progress summary or a periodic linting pass without manual intervention. The SDK exposes create, query, pause, resume, and delete methods for schedules, making this programmable from external tooling as well.

Desktop users also gain the ability to inspect background shells directly from the activity pill. Clicking a running shell reveals its live output and provides a stop action without navigating away from the current context. For goals that spawn multiple subprocesses — test runners, build watchers, database migrations — this reduces the friction of monitoring parallel execution streams. The addition of /reload further smooths the workflow by allowing configuration changes to take effect without a full application restart, which is particularly useful when adjusting model parameters mid-session.

The redesigned model picker, now the default in the desktop client, supports search across favorites, recent models, providers, and variants. For goal-oriented workflows where model selection can materially impact output quality, the ability to quickly switch between providers without leaving the interface reduces context-switching overhead. According to the release notes, the picker includes dedicated Favorites and Recent sections with keyboard-accessible controls.

Experimental Image Generation and Provider Changes

The experimental.imagegenerate toggle introduces an opt-in capability for agents to create or edit images as background tasks. Developers can specify a default model through experimental.imagegenerate.model. After signing in through Codex, GPT Image 2 becomes available, alongside newly added support for MiniMax and Meta Muse image generation providers. While these capabilities are tangential to code-centric goals, they expand the range of objectives an agent can pursue — generating UI mockups, architecture diagrams, or documentation visuals during a session without requiring a separate toolchain.

On the breaking changes front, developers importing @opencode/ai directly should note that the fal, Black Forest Labs, Replicate, and Stability providers have been removed along with their corresponding entry points. Five legacy entry paths have also been eliminated in favor of nested alternatives that were already exported in v2.2.0. Each provider's configure() input type has been standardized to Config, and model() settings become optional when all settings are optional. These changes do not affect CLI, desktop, or HTTP API usage.

Context Management and Reliability Fixes

A subtle but important improvement concerns retry behavior on provider throttling. Previously, rate-limit responses could be misclassified as context overflow errors, causing the agent to truncate its working memory unnecessarily. The fix ensures throttling is retried correctly, preserving more context headroom when fitting tool output into the context window. For goal-oriented sessions that may run for extended periods and encounter multiple providers, this correction reduces the likelihood of premature context loss.

Additional reliability fixes address image-edit reference formats for OpenRouter, Google, and Vercel Grok, plus Git snapshot compatibility with repositories using split indexes. Code Mode diagnostics have also been improved for parse errors, stalled awaits, and promise-like search results, which helps developers troubleshoot when a goal session encounters unexpected behavior.

What This Means for AI Agent Workflows

The goal progress review system reflects a broader industry direction toward autonomous agent operation with human-in-the-loop oversight. OpenCode's implementation is pragmatic: it does not attempt full autonomy but instead creates a structured envelope around sustained execution. The reviewer remains the gatekeeper, but the agent shoulders the burden of continuity.

For teams integrating OpenCode into their development pipelines, the immediate impact is a reduction in the cognitive load of managing conversational state across complex tasks. Rather than mentally tracking what has been done and what remains, developers can delegate that bookkeeping to the goal system. The review checkpoint model also creates natural documentation points — each approval or rejection becomes a record of decision-making that can inform future sessions.

As of this release, the feature is available across TUI and desktop interfaces with consistent behavior. The pause-resume-clear control surface is intentionally minimal, which suggests the design philosophy prioritizes reliability over configurability at this stage. Future iterations may introduce more granular control over review frequency, branching goal structures, or integration with external project management tools.

---

Frequently Asked Questions

Can I run multiple goals simultaneously in OpenCode 2.2.1?

The current implementation supports one active goal per session. If you need to pursue multiple objectives concurrently, the recommended approach is to open separate sessions — either in different terminal windows or desktop instances — each with its own goal context.

Does the /goal system work with any AI model provider?

Goal execution relies on the agent's underlying reasoning capabilities, which vary by model. While the feature is provider-agnostic at the tool level, models with stronger planning and multi-step reasoning abilities typically produce more coherent long-running sessions. The redesigned model picker makes it straightforward to test different providers against the same goal.

What happens to goal progress if the session crashes or disconnects?

OpenCode captures Git snapshots at key points during execution. If a session terminates unexpectedly, repository state should be recoverable from the most recent snapshot. However, the goal's conversational context — including review history and agent reasoning — may not persist across sessions in the current release. Developers working on critical goals should consider committing intermediate results periodically.

Is the image generation feature ready for production use?

Image generation is explicitly marked as experimental and requires opting in through the experimental.image_generate configuration flag. While the underlying providers — including GPT Image 2, MiniMax, and Meta Muse — are production-grade services, the agent's ability to integrate image outputs into goal workflows is still evolving. Users should validate results carefully before relying on this capability in automated pipelines.