Repository navigation
2.1.1 pins opencode 2.4.3. It is a patch release that moves the protocol pin from 2.4.1,
so generated types change the way upstream changed them: a machine reports one Status (unpaired,
offline, online with its OS, architecture and connection, or incompatible) in place of its separate
online, paired, OS, architecture and connection fields, and the server.connected event's data
names the live event stream. Both are listed as breaking under protocol changes. Experimental
push notifications, spaces, feature flags and skill files are added, and a background-service
service.json that cannot be read or decoded is refused instead of read as empty settings.
🔌 Protocol changes
- The SDK pins opencode
2.4.3, where it pinned2.4.1. - Breaking:
MachineInfo.Online,Paired,Os,ArchandConnectionmove into a required
Status, anIMachineStatusthat isMachineStatusUnpaired,MachineStatusOffline,
MachineStatusOnline(which carries theOs, theArchand theConnection, an
IMachineTransport) orMachineStatusIncompatible(with itsIMachineRefusalreason), because
opencode 2.4.3 reports one status per machine.MachineInfoConnection,
MachineInfoConnectionKindandMachineInfoConnectionPathare removed. Before:
if (machine.Online) Console.WriteLine(machine.Os);. After:
if (machine.Status is MachineStatusOnline online) Console.WriteLine(online.Os);. - Breaking:
EventServerConnected.Datachanges fromIReadOnlyDictionary<string, JsonElement>
toEventServerConnectedData, whoseStreamnames the live event stream, which
ExperimentalClient.SubscribeSpacesAsyncaddresses. Before:connected.Data["…"]. After:
connected.Data.Stream. ExperimentalClientmanages push notifications to phones:GetPushSettingsAsync,
RegisterPushDeviceAsync,UpdatePushDeviceAsync,RemovePushDeviceAsync,
SetPushDeviceSessionAsync,RemovePushDeviceSessionAsync,SetPushSessionAsync,
RemovePushSessionAsyncandSetPushSettingsAsync, withExperimentalPushUpdatedon the event
stream.ExperimentalPushDeviceRegisterRequest.CallbackUrlcarries the relay's delivery token, so
the record's printed form masks it.ExperimentalClientreads and writes spaces, a shared key-value store:WriteSpaceValuesAsync,
SyncSpacesAsync,SubscribeSpacesAsync,UnsubscribeSpacesAsyncand
ResetSpaceRevisionsAsync, withExperimentalSpaceUpdated,ExperimentalSpaceDeletedand
ExperimentalSpaceResyncon the event stream.ExperimentalClient.GetFeatureFlagsAsyncreturns the feature flags a location's clients may act
on.ExperimentalClient.GetSkillFileAsyncreads one file of a skill.AgentInfo.Instructions(AgentInfoInstructions) holds an agent's added instructions: text, or
anAgentSelectionInstructionswith the text sent while the agent is selected and the text sent
once when the session switches away.SessionClient.PromptAsyncandExperimentalClient.ActivateSessionSkillAsynccan answer502
SkillLoadError, andFileSystemClient.ReadFileAsync,ListEntriesAsyncandFindEntriesAsync,
ExperimentalClient.WriteFileAsync,CreatePtyAsyncandRunShellCommandAsynccan answer503
ServiceUnavailableErrorwhere the location cannot serve them.ConfigInfoExperimentalexposes theCompactionJobs,McpSkills,CodemodeAgentsand
BrowserStreamTunnelflags,ModelCompatibility.SupportsSystemUpdatesis new, andModelType
gainsEmbedding,RealtimeandTranscription.- The experimental browser tunnel (
experimental.browser.tunnel) is a WebSocket the SDK offers no
door for; its single-use ticket comes from the browser plugin'stunnel.ticketRPC for a browser
attached to a session. - Since opencode 2.4.2, sending a message, command, skill or shell command to an archived session
unarchives it.
🐛 Fixes
- A background-service config (
service.json) that cannot be read or decoded is refused, as opencode's
own CLI refuses it since 2.4.3.OpenCodeServiceConfiguration,OpenCodeServer.ResolveAsyncand
OpenCodeServer.EnsureAsyncthrowOpenCodeServerExceptionnaming the file, where the SDK used to read
it as empty settings, so a configuration change can no longer replace such a file with empty settings.
Only a missing file reads as empty. Discovery and stop no longer migrate the legacy config file; reading
the config still does.
📚 Documentation
SessionInfo.Modelsays when opencode records a session's model: at creation, through
SessionCreateRequest.Modelor from a subagent's agent or parent, on a fork or import, and
throughSwitchModelAsync. A session created through the API without a model has none even when
its agent configures one, and each assistant message records the model it ran on.- The README's API coverage counts five WebSocket connections: three with doors, the planned machine
link, and the browser tunnel, which has none. - Query parameters keep opencode's descriptions: since opencode 2.4.3 they sit on the parameters
themselves, which the generator now reads first. - HQ reads a session's agents, models and providers again when the server announces a change to them
without a location, as opencode's app does from 2.4.3: a plugin that registers late announces its
catalog that way. The getting-started guide says to refresh every loaded location on such an
event. - The pagination guide says that sending a prompt, a command, a skill or a shell command to an
archived session unarchives it, as opencode does from 2.4.2. Sessions.GetTotalCostAsync's documentation names opencode's app and TUI as the clients whose
total it matches. From opencode 2.4.3, opencode's ACP server also adds a child session's
descendants.- The requests guide says that, from opencode 2.4.2, a shell tool call inside an automation's code
action fails when its timeout runs out, while a fixed shell action runs without a timeout.