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
    • Terminal, DesktopThe connect menu no longer lists MCP servers, which are managed in their own place.#60675
  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

    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
    • 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
  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

    TUI plugins require OpenTUI 0.8

    @opencode/plugin now requires @opentui/core and @opentui/solid 0.8.0 or later. In OpenTUI 0.8, a ScrollBox's wrapper, viewport, content, and scrollbars are facade objects instead of renderables, and a custom RenderContext must implement clock and onAnimationTick. See the OpenTUI 0.8.0 release notes.

    #60385

    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

    • 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
    • TerminalAdded a distinct marker for the selected composer suggestion in the new designs.#60393
    • 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
    • TerminalFixed PHP syntax highlighting for code blocks without an opening <?php tag.#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
    • 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.

    Fixes 8

    • 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.
    • 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

    • 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
    • ExtensionsLet Code Mode extension globals return Effects and declare required services.#59948

    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 /usage dialog.#59918@Tarquinen
  6. v1.19.5
  7. v2.2.0

    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

    Breaking changes

    TUI plugins require OpenTUI 0.7

    @opencode/plugin now requires @opentui/core and @opentui/solid 0.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: assign renderBefore, renderAfter, and onLifecyclePass in the constructor instead of as class fields, call refreshHooks() after adding a hook by reflection, and replace defineNativeIntegration() with a static nativeIntegration declaration. See the OpenTUI 0.7.0 release notes.

    #59295

    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 54

    • 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
    • TerminalReturn opencode run --format json server 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 --server and --standalone anywhere 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
  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.