Changelog
New updates and improvements to OpenCode
v2.2.5 Percentage Compaction Buffer
Set
"compaction": { "buffer": "20%" }inopencode.jsonto keep a share of each model's context window free, so one setting fits models with small and large windows. Token counts still work.#60647Improvements
- CoreWhen
readmisses because a folder is missing, the error names that folder and the nearest one that exists.#60688 - CoreWhen
editcan't findoldString, the error shows the file's closest lines, or says the change is already there.#60689 - CoreCalls to a tool named
bashnow run asshellinstead of failing, with the same permissions. A plugin tool actually namedbashstill takes precedence.#60687
Fixes
- CoreMCP servers that send stdio messages larger than 10 MiB no longer get disconnected, and large messages are read much faster.#60694
- CoreIdle locations no longer restart their MCP servers right after shutting down.#60668
- CoreCompaction now caps its prompt at the model's context window when the input limit is larger.#60660
- CoreLiteLLM context window errors now trigger compaction instead of stopping the session.#60692
- CoreReasoning is no longer turned into plain text when you switch models or resume an interrupted response, which caused request errors on some providers.#60498
- Terminal, DesktopThe connect menu no longer lists MCP servers, which are managed in their own place.#60675
- CoreWhen
v2.2.4 Publish Interactive Artifacts
Enable
"experimental": { "artifacts": true }inopencode.jsonto let agents publish, update, and serve HTML or static artifacts through the built-in local provider or plugin-provided storage.#60351Improvements
- CoreMade enabled schedules run under
opencode serveand coordinated multiple server processes so a schedule fires only once. Schedules remain opt-in throughexperimental.schedules.#60478 - CoreRaised OpenCode Go limits for DeepSeek V4.1 Flash.#60625
- SDKExtended
client.experimental.persistentPty.updateto rename terminals or clear a user title, and exposeduserTitlepluspersistent-pty.updatedevents.#60329
Fixes
- CoreAllowed user, project, and remote configuration to override Console-supplied provider names, limits, variants, settings, and headers.#60597
- CoreKept local OpenCode service requests out of environment-configured proxies.#60441
- CoreReplaced Claude Code’s misleading
/logininstruction withclaude auth login.#60592@Tarquinen - TerminalPreserved prompt cursor styles applied by plugins when themes or unrelated prompt state change.#60599
- TerminalAdded missing right padding to edit and patch diffs.#60614
- TerminalExtended the vertical session-tab activity pulse across the full tab width.#60338
- CoreMade enabled schedules run under
v2.2.3 Use Claude Code in OpenCode
Install Claude Code, run
claude auth login, then select Claude Agent in/connectto use your Claude Code login and models.#58782Breaking changes
TUI plugins require OpenTUI 0.8
#60385@opencode/pluginnow requires@opentui/coreand@opentui/solid0.8.0 or later. In OpenTUI 0.8, a ScrollBox'swrapper,viewport,content, and scrollbars are facade objects instead of renderables, and a customRenderContextmust implementclockandonAnimationTick. See the OpenTUI 0.8.0 release notes.Managed policy:
integration.usecovers integrations only
#60315integration.usenow controls which integration accounts can be used, and the newmcp.use,skill.use, andplugin.useactions control MCP servers, skills, and plugins. Rules with the oldmcp:,skill:, andplugin:resource prefixes are converted automatically, but a bareintegration.userule no longer applies to MCP servers, skills, or plugins.Improvements 7
- CoreAdded Code Mode JavaScript checks to experimental schedules, including statically authorized tool calls, persistent state, and custom wake messages.#60140
- CoreAdded separate managed-policy actions for connecting to integrations and using integrations, MCP servers, skills, and plugins.#60315
- Terminal, SDKAdded lazy loading for stored image references when
experimental.media_blobis enabled. Images are downloaded only for previews, while undo, revert, fork, and prompt recall restore referenced attachments safely.#60116 - TerminalAdded a distinct marker for the selected composer suggestion in the new designs.#60393
- SDKPreserved partial
LLMResponseoutput onAIError.partialwhen generation, object generation, or a tool loop fails.#60477 - SDKUnified Effect and Promise tool declarations around
tool(...), with optional output schemas and executable or declaration-only tools.#60407 - SDKAdded typed OpenRouter
debug,models,plugins,provider, anduseroptions to the Responses route.#60044
Fixes 13
- CorePreserved plugin-provided model variants and delayed dynamic provider fallback until external SDK hooks have run.#60097#60380
- CorePreserved permission reasons and feedback in MCP failures, and made Code Mode failures match direct tool-call failures.#60102#60109
- CoreFixed invalid Code Mode schedule checks so creation fails immediately and existing invalid checks pause without repeated execution.#60349
- CoreRemoved a session’s persistent terminals when the session is deleted.#60322
- CoreKept nested tool progress from replacing the parent
executecall rows.#60480 - TerminalFixed PHP syntax highlighting for code blocks without an opening
<?phptag.#60359 - TerminalPreserved
#in file-search paths unless it introduces a valid line range.#60336 - TerminalKept the configured default cursor style after config reloads.#60302
- TerminalMatched the search cursor to the highlighted row when a selection dialog has no query.#60310
- SDKMatched the Promise AI client more closely to the Effect API and accepted typed tools in loops.#60465#60390
- SDKKept tools whose
executehandler can throw available to the AI client.#60431 - SDKContinued polling queued media generations when providers return unknown intermediate statuses.#59988
- SDKStopped sending an incompatible
filenamealongsidefile_urlon OpenAI Responses requests.#60382
v2.2.2 Image Generation by Default
When a connected provider supports image models, agents can now use
experimental_image_generatewithout additional configuration. Set its preferred model throughexperimental.image_generate.model.#60258Improvements
- CoreRecorded the start time of each session’s latest execution.
- SDKAdded
ifanduntilinputs forclient.experimental.schedule.create, plus schedule check results and output fields.#60137 - SDKExposed
SessionInfo.time.busyfor the latest execution’s start time. - SDKAdded optional source metadata to prompt file attachments.
Fixes 7
- CoreRejected persistent terminal requests whose working directory no longer exists.
- CorePreserved media when sessions are forked or imported.
- CoreAssociated image-generation notices with the correct background job.
- TerminalPreserved captured attachments and their original source paths.#60222@OpeOginni
- TerminalPrevented middle-truncated paths from overflowing at very narrow terminal widths.
- TerminalImproved Go usage-limit messages with the reset time and account page link.
- TerminalCorrectly typed and displayed Go and ChatGPT usage-limit errors.
v2.2.1 Keep Working Toward a Goal
Run
/goal <objective>in the TUI or Desktop to let the session continue until a reviewer confirms the objective is met. Use/goal pause,/goal resume, or/goal clearto control it.#59437Generate Images
Enable
experimental.image_generateto let agents create or edit images with the newimage_generatetool. You can optionally set its default model withexperimental.image_generate.model.#59939#60096Improvements 8
- CoreAdd opt-in scheduled prompts through
/schedule, agent tools, andexperimental.schedules.#59401#59457 - CoreOffer GPT Image 2 after Codex sign-in and add MiniMax and Meta Muse image generation support.#60085#59929#60081
- CoreAdd Responses API support for OpenRouter, DigitalOcean, and Venice, including freeform tools.#59991#59963
- CoreImprove snapshot performance by coalescing captures and avoiding repeated ignore-file work.#59419
- SDKAdd
client.experimental.schedule.{create,list,get,pause,resume,delete}for managing scheduled prompts.#59457 - SDKGroup experimental generated-client methods under
client.experimental; previous locations remain as deprecated aliases until the next minor release.#59072 - SDKExpose compaction through the Promise AI client.#59987
- SDKAdd freeform tool support and Responses routes for OpenRouter, DigitalOcean, and Venice.#59963#59991
Fixes 11
- CorePreserve more context headroom when fitting tool output into the context window.#59934
- CoreRetry provider throttling correctly instead of reporting it as context overflow.#59649
- CoreSend image-edit references and image sizes in the formats expected by OpenRouter, Google, and Vercel Grok.#60067#59927
- CoreKeep credential metadata and prompt-cache settings out of model settings and variants.#60057#59500
- CoreKeep Git snapshots working in repositories that use a split index.#59417
- CoreExpose Console web search only when the workspace enables it.#59592
- CoreImprove Code Mode diagnostics for parse errors, stalled awaits, and promise-like search results.#59834#59749#59981
- TerminalShow execution failures that occur before the first model step.#60079
- TerminalKeep the activity spinner visible while a continued subagent runs.#59950
- TerminalSend pasted image and PDF paths correctly when connected to a local server.#59833
- TerminalImprove spacing in an empty
/usagedialog.#59918@Tarquinen
- CoreAdd opt-in scheduled prompts through
v1.19.5 v2.2.0 Create, install and share Desktop plugins (experimental)
Add experimental image and decision generation APIs to plugins and sdk
Add experimental image and decision generation APIs to plugins and sdk, allowing image generation or decision model (think typesafe, clef, etc) workflows.#59190#59380#58758
Plugins can now attach and update keyed session instructions with ctx.session.instructions.entry.put/list/remove
Plugins can now attach and update keyed session instructions with ctx.session.instructions.entry.put/list/remove. Instead of editing the system prompt and busting the prompt cache, each change is added as a small update at the next step. The entries also survive compaction and reverts, and they don't start an extra model turn.#56550
Add configurable prompt cache TTLs per provider/model
Breaking changes
TUI plugins require OpenTUI 0.7
#59295@opencode/pluginnow requires@opentui/coreand@opentui/solid0.7.0, up from 0.6.8 or later. Plugins that depend on OpenTUI 0.6 fail to install until they upgrade. In OpenTUI 0.7, custom renderables read their hooks from their class at construction: assignrenderBefore,renderAfter, andonLifecyclePassin the constructor instead of as class fields, callrefreshHooks()after adding a hook by reflection, and replacedefineNativeIntegration()with astatic nativeIntegrationdeclaration. See the OpenTUI 0.7.0 release notes.Improvements 27
- CoreImprove integration rebuild performance.#59402
- CoreLet custom model configuration set a model type.#59388
- CoreLet model-list API requests filter by type.#59355
- CoreMake external-directory permission checks use the project's filesystem.#59089
- CoreReduce memory use when code search finds very large lines.#59205
- CoreLet plugins filter event subscriptions by type.#58864
- CoreMove image resizing off the main process and release idle image memory.#58820
- CoreReduce repeated session-history loading during a step.#59091
- CoreAdd an experimental API for session media and opt-in media URI support.#59103
- CoreAdd the machine hostname to
/api/info.#59090 - CoreAdd experimental content-addressed blob storage for session media behind
experimental.media_blob.#58656#58741 - CoreStart session history from the latest completed compaction.#59020
- CoreReduce work encoding durable event payloads that are not persisted.#58923
- CoreExpose MCP server titles from
serverInfo.#58950 - CoreApply OpenCode Console workspace configuration as a configuration layer.#57703
- CoreReplace experimental evaluations with Decision APIs in the AI pkg, including OpenAI Decisions, System One, and Cloudflare Run models.#58758#58382#58379#58381
- CoreConvert tool schemas once to speed up tool execution.#58798#58848
- CoreMake Git project discovery faster while recognizing repository changes.#58616
- CoreShow OpenCode Console budget limits and Go usage where they block you.#58694#58714
- CoreRecord provider-reported session costs.#58562
- CoreFind Git more reliably on macOS.#58602
- CoreResolve model details once per prompt step.#58601
- CoreAdd GPT-6.1 Terra and GPT-6.1 Terra Fast to Sign in with ChatGPT.#59359
- TerminalReduce CPU use while animated session-tab pulses are visible.#59235
- TerminalList OpenCode Console before OpenCode Go in the integration picker.#59107
- TerminalAdd
/usage, model-picker, prompt, sidebar, warning, and error details for OpenCode Console usage limits.#58731 - TerminalMake CLI service registration more reliable when concurrent processes update its files.#59105
Fixes 59
- CoreWait for plugins to finish reloading before each session step and tool call.#51133@kernel-oops@Tarquinen
- CoreSize session compaction from the provider's reported token count to preserve usable context.#59441
- CoreSkip unavailable models.dev API entrypoints instead of failing model catalog updates.#59475
- CoreReturn a server error with a reference ID when the server cannot encode a response.#59459
- CoreAvoid warming a session while its model request is running.#59325
- CorePreserve legacy MCP
codemodesettings during migration.#59126@tneemo - CoreUse the correct Vertex AI endpoints for the
euandusmulti-regions.#59335 - CoreAccept Databricks hosts that include
http://orhttps://.#59334 - CoreKeep files intact when patch edits move a file onto itself.#59197
- CorePreserve literal
$0and$ARGUMENTStext in custom command input.#59198 - CoreClose project locations concurrently during shutdown.#59326
- CoreTreat equivalent directory paths, including trailing slashes, as one location.#59327
- CoreSend valid tool schemas to Kimi for tuple, default, and keyword-like arguments.#59207
- CoreExpose Code Mode MCP tools directly when the
executepermission is denied.#59315 - CoreCoordinate OAuth credential refreshes across locations and processes.#54023
- CoreList and search remote Git branches correctly without bare remote names.#58597
- CoreDetect AVIF, HEIC/HEIF, QuickTime, and M4A attachments correctly.#58480#58886#58887
- CoreReduce memory retained by long-running tool calls and unchanged hooked model requests.#58448#58449
- CoreLoad session diffs without reading every message, improving performance for large sessions.#57686
- CoreKeep active locations alive when session events use an equivalent directory path.#56259
- CoreReload compatibility skills only when their own sources change.#59086
- CoreAvoid publishing redundant catalog updates when configuration is unchanged.#56267
- CoreAvoid booting idle or deleted project locations while polling session forms.#59083
- CoreWait for plugins before returning agent and provider lists, preventing incomplete catalogs.#59082
- CoreManage sessions and instruction entries after their project directory is deleted.#58997
- CoreStart fuzzy file search only on first use, reducing project startup work.#58959
- CoreExit after 10 seconds when shutdown hangs and report pending work.#58817
- CoreKeep the models catalog fresh without redownloading it when unchanged.#58813
- CoreSend xAI Responses
top_ksettings and stop sending unsupported penalties.#58868 - CoreHonor shared parallel tool-call and service-tier settings for Groq.#58871
- CoreRetry throttled requests instead of misreporting them as context overflows.#58866
- CorePreserve streamed text and reasoning that arrive after an OpenAI Chat finish reason.#58851
- CoreClassify AWS REST JSON errors consistently regardless of where the error type appears.#58770
- CoreValidate large base64 attachments without slowdowns or hangs.#58811
- CoreRetry Bedrock throttling errors as rate limits instead of context overflows.#58759@Irish-Joseph
- CoreKeep working MCP tools available when a server returns malformed ones.#58350
- CoreMatch absolute instruction-file globs across directories.#58749@heimoshuiyu
- CoreUse configured provider regions in Bedrock endpoint URLs.#58538
- CoreHandle unknown OpenAI Chat finish reasons without failing the response.#58608
- CoreAvoid unnecessary Azure model updates when endpoint transforms make no change.#58600
- CorePrefer JPEG for opaque browser screenshots, reducing attachment size.#56990
- CoreDetect generated image types from their bytes when compatible hosts omit the format.#58475
- CoreKeep project services alive while sessions run long tools or wait for input, with a 24-hour inactivity cap.#57274
- CorePrevent unrelated configuration changes and compatibility-skill update bursts from repeatedly reloading skills.#56260
- TerminalReturn
opencode run --format jsonserver connection errors as JSON.#59366@andreivince - TerminalPreserve pasted prompt text when copying it back out.#59209
- TerminalReliably update the background service on Windows when its files are briefly locked.#59105
- TerminalKeep the background service state directory out of tool shells and identify processes blocking its port.#58815
- TerminalRefresh Git branch details after switching branches.#58982
- TerminalKeep the TUI running when a plugin slot or route renders bare text.#58144@anmol0b@Tarquinen
- TerminalAccept
--serverand--standaloneanywhere in supported CLI commands.#58505 - TerminalRelease closed and background session transcripts to prevent memory growth.#58434#57025
- TerminalConnect remote access tunnels through HTTP proxies.#58464
- TerminalKeep development builds on a separate server, database, and port from released builds.#58331
- SDKFix generated Promise client input types for TypeScript consumers.#58875
- SDKLet SDK clients discard inline tool-result file payloads to reduce memory use.#59101
- SDKAvoid unnecessary catalog refreshes for locations an SDK client has not loaded.#55237#59099
- SDKRestore running sessions created while an SDK client was disconnected.#53012
- SDKRelease omitted tool-image payloads from memory instead of retaining their base64 data.#58560
v1.19.4 Upgraded the bundled Bun runtime to 1.4.4
Upgraded the bundled Bun runtime to 1.4.4, which includes security fixes for Brotli, TLS, HTTP/1.1, HTTP/2, HTTP/3, WebSocket, and
fetch, and updates root certificates to NSS 3.131.1.v1.19.3 Improvements
Improvements
- CoreConfigure model reasoning options to generate reasoning variants, replacing catalog variants while preserving your configured variant overrides.
v1.19.2 OpenCode 1 now stays on the 1.x release line
OpenCode 1 now stays on the 1.x release line: update checks use only the npm
opencode-ailatest version, so 1.x installs are never offered a 2.x build as a regular update.Fixes
- CoreUpgrading to OpenCode 2 remains a separate, explicit choice through the 2.0 offer in
/updateoropencode upgrade --major. - CoreFix upgrades for installs managed by yarn.
- CoreSkip 1.x updates for Homebrew Core installs, which now track OpenCode 2, and check tap and Chocolatey availability before offering an update.
- CoreThe install script refuses to install 2.x versions.
- CoreUpgrading to OpenCode 2 remains a separate, explicit choice through the 2.0 offer in