OpenCode 2 v2.2.7: GitHub Copilot Auto, read from file end#

Published by

Part of the OpenCode 2 Version Tracker series. | OpenCode on GitHub | OpenCode 2 docs

OpenCode 2 v2.2.7 builds on v2.2.6 with GitHub Copilot Auto, a router pick in the model picker that chooses a model per session at the Auto discount. The read tool takes a negative offset to read from the end of a file, and remote MCP logins survive refresh-token rotation across several clients at once.

GitHub Copilot Auto#

Pick Auto in the model picker when your Copilot account has an Auto pool, and Copilot's router chooses the model for each session at the Auto discount. If routing fails, OpenCode falls back to the account's default chat model (#62997).

Under it sits a new session plugin hook, experimental.model.resolve, that fires during model resolution and can replace the chosen model before a turn runs. The GitHub Copilot provider registers it to swap an Auto pick for the routed model, and session titles keep Copilot's utility model and never route (#62997).

Plugin hookWhat It Does
experimental.model.resolveA session hook a plugin registers. It fires during model resolution and can replace the chosen model before a turn runs. The GitHub Copilot provider registers it to route Auto picks (#62997)

Two Copilot fixes land alongside it. Session costs reflect the amount Copilot charged, and content-filter errors name the filter that blocked the response (#62034). After a plan change, Copilot picks up its new API endpoint on the next model refresh, so you stay signed in (#62171).

The read and shell tools#

read accepts a negative offset to read from the end of a file, such as -50 for the last 50 lines. An offset past the end returns the last lines and the file's line count (#62147). When read can't find a file, it suggests close names: a different capitalization, another extension, a small typo, or the matching path inside the project (#62147).

Shell results end with Exit code: N. A command killed by a signal shows the signal name, and a timeout reports how long it waited and suggests a larger timeout (#62141).

MCP and provider durability#

Remote MCP servers that rotate refresh tokens keep you signed in when several clients refresh at once or the token endpoint fails for a moment, and a temporary refresh failure keeps the login for the next try (#62827, #63012). MCP tool calls no longer fail when a server's result doesn't match the tool's own output schema, so completed actions aren't reported as failed (#61254). When MCP servers connect, disconnect, or change tools, Code Mode sends the model a short list of what changed (#62176). With background_compaction on, a background summary no longer stops a running Claude Agent session mid tool call (#63025).

Side panel tabs and sessions#

Right-click a side panel tab for Close tabs to the right. ⌘W closes side panel tabs wherever focus sits, ⌥⌘W or Ctrl+Alt+W closes the session tab, and ⌘⇧T reopens the last closed tab of either kind (#62922). The menu on a tab, Home row, project row, or inbox card gains Mark as unread, which keeps the session's dot until your next visit (#62889).

SDK breaking changes#

@opencode/ai removes ImageResponse.image; read response.images[0] instead (#63011). Several SDK endpoints stop blocking on plugin load:

On a Location still loading pluginsEndpoints
Return nowagent.list (agents loaded so far), integration.list, usage.limits, vcs.init, rpc.call, artifact.*
Still wait for pluginsmodel, provider, generate.*, voice.*, websearch.query

Entries and actions a plugin provides appear when it finishes loading, so a client refreshes on the matching *.updated event (#62796, #63040).

A seam for per-session model routing#

The picker names a model, then experimental.model.resolve lets a plugin rewrite that choice per session before the turn runs. Copilot Auto is the first consumer, swapping the Auto placeholder for whatever Copilot's router returns, but the hook is general to any registered plugin, so per-session model selection is now a point a provider plugin can own.

The SDK change points the same way. On a Location still loading plugins, agent.list and the endpoints beside it return what is ready and emit *.updated as plugins finish, so a client reads partial state and subscribes to the events rather than waiting on a fully loaded Location. Both changes move work that used to block onto a hook or an event that a plugin or client reacts to.

Sources#

All trademarks and software referenced belong to their respective owners.

Previous OpenCode 2 analysis: v2.2.6 (November 7, 2026)

All 28 OpenCode 2 analyses: OpenCode 2 Version Tracker · Official OpenCode 2 changelog

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy