Changelog
New updates and improvements to OpenCode
v1.19.6 Sessions with many images no longer send oversized requests
Sessions with many images no longer send oversized requests. When the images in a session's history pass 25 MiB, the oldest are replaced with a placeholder.
Fixes
- CoreA provider error for a request body that is too large now starts compaction and a retry instead of failing the turn.
v2.3.0 Background Subagents by Default
Subagents now return immediately, continue in the background, and report back whenever they become idle. You can keep working in the parent session while multiple subagents run concurrently.#63382
See all highlights in v2.3.0Improvements 12
- CoreAdded experimental support for MCP events, behind the
mcp_eventsflag.#63254#63261#63269 - CoreShell commands now survive server handoffs and keep their output when interrupted.
- CoreAdded experimental support for moving a shell command to the background when its timeout expires, behind the
shell_timeout_backgroundflag. With the flag on, an explicit timeout on a background command stops it.#63024#63703 - CoreLocal Windows shell commands now run through the process daemon.
- CoreAdded support for freeform tool input on compatible models.
- CoreAdded LM Studio decision-model support.
- CoreAgents are now told when their session is a fork. Thanks @hasta84.#63235
- CoreTool output truncation now keeps the beginning of the output and preserves a usable preview if the full output cannot be saved.
- CoreTail reads no longer load the entire file into memory.
- CoreProviders can present a client certificate for gateways that require mutual TLS. Set
settings.tlswithcert,keyand an optionalpassphraseon the provider; values accept{file:}and{env:}likeapiKey.#61832 - CoreWhen a subagent goes idle while its own background work is still running, its report to the parent now says it is still running, so the parent waits for the final report instead of treating the partial answer as done.#63675
- CoreCode Mode gets simpler structured results from file and skill tools:
writeandeditreturn their confirmation as a string,patchreturns an empty result, andskillreturns the skill's directory and content.#63616#63635#63618#63623
Fixes 12
- CoreFixed case-only file renames in patches on case-insensitive filesystems.
- CoreFixed stale thinking being retained after Claude Agent prompts or tools change.
- CoreFixed directly driven child sessions not resuming after a restart.
- CoreFixed plugin replacement stopping when cleanup of an earlier plugin fails.
- CoreFixed MCP OAuth refreshes and localhost redirects when a server rewrites
127.0.0.1. - CoreFixed saved API keys being omitted from local-model discovery.
- CoreLocal model discovery (Ollama, LM Studio, vLLM) waits up to 15 seconds per request instead of 1, so remote or tunnelled endpoints list their models, and a slow endpoint no longer delays other endpoints or config reloads.#63700
- CoreIn Code Mode, calling a namespace as if it were a tool now suggests up to three real tools under it.#63697
- CoreFixed retryable provider streams losing completed work when interrupted.
- CoreFixed GitHub Copilot requests using the wrong endpoint before models finish loading.
- CoreFixed exhausted request rate limits being treated as terminal. Thanks @Kyle-j-bush.#59816
- CoreFixed LM Studio models with a null context length and accepted decision-type models. Thanks @tomzhu1024.#56214
- CoreAdded experimental support for MCP events, behind the
v2.2.7 MCP Logins Stay Signed In
MCP Logins Stay Signed In: Remote MCP servers that rotate refresh tokens no longer sign you out when several clients refresh at once or the token endpoint fails for a moment.#62827#63012
See all highlights in v2.2.7Improvements
- Core
readaccepts a negativeoffsetto read from the end of a file, such as-50for the last 50 lines. An offset past the end returns the last lines and the file's line count instead of failing.#62147 - CoreShell results end with
Exit code: N. Commands killed by a signal show the signal name, and timeouts say how long they waited and suggest a larger timeout.#62141 - CorePrompt cache warming times its pings from the model's
cache.ttlby default (interval: "auto"), or every 4 minutes without a TTL. Models whose cache outlasts the warmingdurationare no longer pinged.#62831 - CoreWhen MCP servers connect, disconnect or change tools, Code Mode sends the model a short list of what changed instead of the whole tool catalog.#62176
Fixes 24
- CoreGitHub Copilot session costs use the amount Copilot charged instead of the catalog estimate, and content-filter errors name the filter that blocked the response.#62034
- CoreGitHub Copilot picks up a new API endpoint after a plan change on its next model refresh, so you no longer have to sign in again.#62171
- CoreRemote MCP servers that rotate refresh tokens no longer log you out when the TUI, desktop app, background service or several projects refresh the same login at once.#62827
- CoreA temporary failure while refreshing an MCP OAuth token keeps your login for the next try instead of marking the server
needs_auth.#63012 - CoreMCP tool calls no longer fail when the server's result doesn't match the tool's own output schema, so completed actions aren't reported as failed.#61254
- CoreMCP prompts stay available when refreshing a server's prompt list fails.#62266
- CoreWith
background_compactionon, a background summary no longer stops a running Claude Agent session mid tool call.#63025 - CoreAfter
opencode auth logouton a.well-knownintegration, its remote providers and policies stop applying until you log back in.#62760 - CoreOpenCode Console workspace policies still apply when Console's instructions or skills fail to load.#62702
- CoreCloudflare AI Gateway providers set up with only
gatewayApiKeynow send that key.#62574 - CoreA v1 model override that sets only some capabilities no longer resets the others, so catalog capabilities like PDF input are kept.#62573
- CoreA v1 provider config that sets both
apiandoptions.baseURLkeepsoptions.baseURL.#62570 - CoreLegacy model references with an inline variant, such as
"openai/gpt-5#high", keep the variant.#62254 - CoreA fresh install imports saved provider credentials from the legacy
auth.json, and skips an invalid one with a warning instead of stopping setup.#62568 - CoreCache warming stops for a session when a ping rebuilds the cache instead of reading it, counts its interval from when a request was sent, and no longer pings during compaction or after the session is deleted.#62926#62941#62972
- CoreTokens and cost from
session.generaterequests, including cache warming pings, count toward the session's totals.#63006 - CoreUnder zsh, a glob that matches nothing, like
rm *.tmp, is passed through as bash does instead of stopping the command.#62141 - CoreOn Windows, multi-line commands no longer lose everything after the first line with PowerShell 7 from the Microsoft Store.#62522
- Core
readno longer cuts an emoji in half when it shortens a long line.#62575 - CoreGenerated session titles no longer include the model's commentary.#62267@shanebishop1
- CoreMarkdown agents whose
descriptionstarts with a bracketed tag, like[Beta] Reviews code, now load.#62250 - CoreMarkdown agent and command files that fail to load log a warning with the file path and frontmatter error.#62464#62251
- CoreMarkdown agent discovery skips
node_modules.#62571 - CoreFailed plugin installs from git show git's own error instead of "An unknown git error occurred".#62261
- Core
v2.2.6 Shared MCP Connections
Turn on pooling for an MCP server to share one connection across projects with the same setup, so you run fewer processes and start faster.#61185
Scripted Runs in Worktrees
Run
opencode run -wto start the session in a new git worktree, or--worktree=<name>to name it.#60712 See all highlights in v2.2.6Automatically Archived Runs
Add
--archivedtoopencode runto keep scripted and CI sessions out of your inbox and session lists.#61270Improvements
- CoreAdded provider- and model-specific session warming settings, including an
interval: "auto"mode based on cache TTL.#60025#60969 - CoreAdded the
websearch.usepolicy action and switches for enabling all feature flags withOPENCODE_FLAGS=allorexperimental.all_flags.#61557#61826 - CoreAdded an experimental bytecode VM for Code Mode. It is off by default; turn it on with
experimental.codemode_vm: trueorOPENCODE_FLAGS=codemode_vm.#62358 - CoreAdded support for Microsoft Store installations of PowerShell 7 on Windows.#61952
- CoreAdded Azure Messages support for Foundry Claude models.#60934
Fixes 12
- Core
opencode runnow waits for the background shell commands, subagents, and image jobs that its prompt started, then lets the model respond to their results before it exits. While it waits, it printswaiting for N background job(s)(abackground_waitevent with--format json). There is no time limit: a job that never exits, such as a dev server or file watcher, keeps the run open until you press Ctrl+C or send SIGTERM, so set a timeout on CI jobs.#60699#61911 - CoreReworked noninteractive
opencode runexecution so arguments, cancellation, compiled WebSocket upgrades, and service shutdown complete reliably. SIGTERM now cancels the session and its background jobs and exits with code 143.#61911#61721#61518#61564 - CoreServe file reads and media from the server API as sandboxed downloads, and refuse cross-site browser navigations and requests from disallowed origins to
/api/*, so a file in your project cannot run scripts on the server's origin.#62422 - CoreWebfetch and Code Mode
fetchnow reject URLs that contain credentials and ignore the#fragmentwhen matching permission rules, and Code Modefetchchecks every redirect against your webfetch rules.#60502#61701#62373 - CoreAsk for
external_directorypermission beforesession_moveleaves the current project.#62204 - CoreWait up to 2 seconds for MCP servers that are still connecting before a model call, so tools from servers that connect quickly reach the first prompt and
opencode run. Also expand~in local MCP working directories, handle legacy stdio servers, and sendlogo_uriduring dynamic registration.#60490#61496#61817#59031 - CoreTime out OpenCode Console config requests after 5 seconds, so startup no longer hangs when the Console accepts the connection but never answers.#62404
- CoreRetry provider requests while their host is unreachable and recover prematurely ended Cohere streams.#61880#61184
- CoreKeep legacy custom providers whose models set only part of
limit, such as onlylimit.context, instead of dropping the whole provider without an error. Thanks @Tarquinen.#62240 - Core
opencode acpnow removes a session that a client creates withsession/newand closes without prompting, so IDE integrations no longer leave empty sessions behind.#62189 - CorePrevent repeated zsh
qflags from freezing shell permission scanning. Thanks @yangguan-xue.#60791 - CoreAllow npm upgrade install scripts again. Thanks @renatomoselli.#51554
- CoreAdded provider- and model-specific session warming settings, including an
v2.2.5 Percentage Compaction Buffer
Set
See all highlights in v2.2.5"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
- CoreWhen
v2.2.4 Publish Interactive Artifacts
Enable
See all highlights in v2.2.4"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
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
v2.2.3 Use Claude Code in OpenCode
Install Claude Code, run
See all highlights in v2.2.3claude auth login, then select Claude Agent in/connectto use your Claude Code login and models.#58782Breaking changes
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
Fixes
- 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
v2.2.2 Image Generation by Default
When a connected provider supports image models, agents can now use
See all highlights in v2.2.2experimental_image_generatewithout additional configuration. Set its preferred model throughexperimental.image_generate.model.#60258Improvements
- CoreRecorded the start time of each session’s latest execution.
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.
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.#59437 See all highlights in v2.2.1Generate 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
- 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
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
- CoreAdd opt-in scheduled prompts through
v1.19.5