Skip to content

Changelog

New updates and improvements to OpenCode

  1. v2.2.5

    Percentage Compaction Buffer

    Set "compaction": { "buffer": "20%" } in opencode.json to keep a share of each model's context window free, so one setting fits models with small and large windows. Token counts still work.#60647

    Improvements

    • CoreWhen read misses because a folder is missing, the error names that folder and the nearest one that exists.#60688
    • CoreWhen edit can't find oldString, the error shows the file's closest lines, or says the change is already there.#60689
    • CoreCalls to a tool named bash now run as shell instead of failing, with the same permissions. A plugin tool actually named bash still 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
  2. v2.2.4

    Publish Interactive Artifacts

    Enable "experimental": { "artifacts": true } in opencode.json to let agents publish, update, and serve HTML or static artifacts through the built-in local provider or plugin-provided storage.#60351

    Improvements

    • CoreMade enabled schedules run under opencode serve and coordinated multiple server processes so a schedule fires only once. Schedules remain opt-in through experimental.schedules.#60478
    • CoreRaised OpenCode Go limits for DeepSeek V4.1 Flash.#60625
    • SDKExtended client.experimental.persistentPty.update to rename terminals or clear a user title, and exposed userTitle plus persistent-pty.updated events.#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 /login instruction with claude auth login.#60592@Tarquinen
  3. v2.2.3

    Use Claude Code in OpenCode

    Install Claude Code, run claude auth login, then select Claude Agent in /connect to use your Claude Code login and models.#58782

    Breaking changes

    Managed policy: integration.use covers integrations only

    integration.use now controls which integration accounts can be used, and the new mcp.use, skill.use, and plugin.use actions control MCP servers, skills, and plugins. Rules with the old mcp:, skill:, and plugin: resource prefixes are converted automatically, but a bare integration.use rule no longer applies to MCP servers, skills, or plugins.

    #60315

    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_blob is enabled. Images are downloaded only for previews, while undo, revert, fork, and prompt recall restore referenced attachments safely.#60116
    • SDKPreserved partial LLMResponse output on AIError.partial when 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, and user options to the Responses route.#60044
    • ExtensionsAdded persistent-terminal renaming to the process daemon, including capability discovery and user titles that override shell-provided titles until cleared.#60324

    Fixes 11

    • 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 execute call rows.#60480
    • SDKMatched the Promise AI client more closely to the Effect API and accepted typed tools in loops.#60465#60390
    • SDKKept tools whose execute handler can throw available to the AI client.#60431
    • SDKContinued polling queued media generations when providers return unknown intermediate statuses.#59988
    • SDKStopped sending an incompatible filename alongside file_url on OpenAI Responses requests.#60382
    • ExtensionsPreserved null values in Code Mode text encoding.#57639@xiajiahang
    • ExtensionsTidied nested Extensions menus.#59468
  4. v2.2.2

    Image Generation by Default

    When a connected provider supports image models, agents can now use experimental_image_generate without additional configuration. Set its preferred model through experimental.image_generate.model.#60258

    Unified Quotes and Annotations

    Timeline quotes, terminal quotes, and browser annotations now share a compact optional-comment editor, while source highlights remain attached to local drafts.#60164

    Improvements

    • CoreRecorded the start time of each session’s latest execution.
    • SDKAdded if and until inputs for client.experimental.schedule.create, plus schedule check results and output fields.#60137
    • SDKExposed SessionInfo.time.busy for the latest execution’s start time.
    • SDKAdded optional source metadata to prompt file attachments.

    Fixes

    • 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.
    • ExtensionsCorrected visible flowchart edges connected through Merman subgraphs.
  5. 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 clear to control it.#59437

    Generate Images

    Enable experimental.image_generate to let agents create or edit images with the new image_generate tool. You can optionally set its default model with experimental.image_generate.model.#59939#60096

    Improvements 9

    • CoreAdd opt-in scheduled prompts through /schedule, agent tools, and experimental.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
    • ExtensionsLet Code Mode extension globals return Effects and declare required services.#59948

    Fixes 7

    • 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
  6. v1.19.5
  7. 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

    #59157

    Improvements 23

    • 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

    Fixes 49

    • 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 codemode settings during migration.#59126@tneemo
    • CoreUse the correct Vertex AI endpoints for the eu and us multi-regions.#59335
    • CoreAccept Databricks hosts that include http:// or https://.#59334
    • CoreKeep files intact when patch edits move a file onto itself.#59197
    • CorePreserve literal $0 and $ARGUMENTS text 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 execute permission 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_k settings 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
    • 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
  8. 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.

  9. v1.19.3

    Improvements

    Improvements

    • CoreConfigure model reasoning options to generate reasoning variants, replacing catalog variants while preserving your configured variant overrides.
  10. 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-ai latest 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 /update or opencode 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.