OpenCode 2 v2.2.1: goal mode, image generation, scheduled prompts#
Published by Alex Sorokoletov
Part of the OpenCode 2 Version Tracker series. | OpenCode on GitHub | OpenCode 2 docs
OpenCode 2 v2.2.1 follows v2.2.0. It adds a /goal command that runs a session until an automatic review agrees the objective is met (#59437), an opt-in image_generate tool behind experimental.image_generate (#59939), and scheduled prompts via /schedule and experimental.schedules (#59401). Desktop gains a searchable model picker and live background-shell inspection.
Goal mode#
/goal <objective> starts a run that continues until an automatic progress review agrees the objective is met, with /goal pause, /goal resume, and /goal clear to control it (#59437). The TUI shows the goal status below the prompt and provides a dialog for pausing, resuming, or clearing it; the command is available in both the TUI and Desktop (#59437).
Image generation#
Setting experimental.image_generate enables an image_generate tool that agents call to create or edit images in the background, with experimental.image_generate.model to set its default model (#59939, #60096). The release adds image-generation support for GPT Image 2 after Codex sign-in, MiniMax, and Meta Muse (#60085, #59929, #60081). Image-edit references and image sizes are sent in the formats OpenRouter, Google, and Vercel Grok expect (#60067, #59927).
Desktop#
- A redesigned, searchable model picker is now the default, with Favorites and Recent sections and keyboard-accessible provider controls (#59997).
- Selecting a running background shell from the activity pill shows its live output and a Stop action without leaving the menu (#59496).
/reloadapplies configuration changes without restarting (#59887); the CLI exposes the same asopencode reload.[1]
Providers and context handling#
- Responses API support lands for OpenRouter, DigitalOcean, and Venice, including freeform tools (#59991, #59963).
- Provider throttling now triggers a retry (#59649), and more context headroom is preserved when fitting tool output into the window (#59934).
- Git snapshots keep working in repositories that use a split index (#59417), and snapshot captures are coalesced to cut repeated ignore-file work (#59419).
- Code Mode diagnostics improve for parse errors, stalled awaits, and promise-like search results (#59834, #59749, #59981).
Breaking changes for @opencode/ai importers#
Code that imports the @opencode/ai package directly loses the fal, Black Forest Labs, Replicate, and Stability providers and their entry points (#59977), and five legacy Bedrock and Vertex entry points are removed in favor of the nested paths that 2.2.0 already exported (#59506). Each provider's configure() input type is renamed to Config (#59765). The CLI, Desktop, and HTTP API are unchanged.
Experimental flags (what's coming)#
| Flag | What It Does |
|---|---|
experimental.image_generate | Enables the image_generate tool for creating and editing images; experimental.image_generate.model optionally sets its default model (#59939, #60096) |
experimental.schedules | Enables scheduled prompts, also reachable from the /schedule command and agent tools (#59401, #59457) |
Sessions that keep running without a person at each step#
Several of these features let a session do work while no one watches each step. Goal mode continues until its own review step agrees the objective is met, scheduled prompts fire without a person present, and image generation and shells run in the background. /reload and opencode reload apply config to a live server.
That puts more weight on the long-lived server process. A goal run also runs an automatic review step between stretches of work, so a longer objective means more of those checks before the session stops on its own.
All trademarks and software referenced belong to their respective owners.
Sources#
reload: OpenCode 2 docs, CLI commands.
Previous OpenCode 2 analysis: v2.2.0 (October 29, 2026)
All 22 OpenCode 2 analyses: OpenCode 2 Version Tracker · Official OpenCode 2 changelog