All notable changes to the protocol specification are documented here. The
spec is versioned independently from the per-language client libraries; see
each clients/<lang>/CHANGELOG.md for client release history.
The format is based on Keep a Changelog
and the spec follows SemVer. Until 1.0.0 is reached,
breaking changes may land in MINOR bumps (see
docs/specification/versioning.md).
Each released entry includes a Spec version line that exactly matches the
PROTOCOL_VERSION constant in types/version/registry.ts
at the time of release. The publish-spec.yml workflow refuses to publish a
spec/vX.Y.Z tag whose matching ## [X.Y.Z] heading is missing from this
file.
The next spec release will be cut from main once breaking or notable additive
changes accumulate. Track in-flight protocol changes via PRs touching
types/ and the per-symbol ACTION_INTRODUCED_IN /
NOTIFICATION_INTRODUCED_IN maps in
types/version/registry.ts.
ChangesetOperationStatus.Disabled— signals that a changeset operation is currently unavailable and cannot be invoked, so clients can render the control as disabled rather than hiding it.ChangesetOperation.group— optional identifier for grouping related changeset operations together in the UI.
Snapshot.statenow acceptsResourceWatchState, soinitialize/reconnect/subscribecan seed anahp-resource-watch:channel from a point-in-time snapshot. Existing variants (root, session, terminal, changeset, annotations) are unchanged.
- Session reducers now apply
_metaupdates from every tool-call-scoped action, not onlysession/toolCallStart.
Spec version: 0.4.0
annotations/updated(AnnotationsUpdatedAction) — a client-dispatchable action that partially updates an existing annotation's own properties (turnId,resource,range,resolved) without resending its entries. Resolving or re-anchoring an annotation no longer requires replacing the whole annotation viaannotations/set. Omitted fields are left unchanged; the annotation'sentries,id, and_metaare never touched.ahp-chat:channel for per-chat conversation state;SessionState.chats[]catalog;SessionState.defaultChat?input-routing hint;ChatOriginprovenance union;createChatcommand.ChatSummary.workingDirectory?— optional per-chat working directory. When absent, chats inherit the session'sworkingDirectory. Enables agent-swarm patterns where multiple chats in one session operate on independent worktrees.- Three discrete chat-catalog actions on the session channel —
session/chatAdded(upsert bysummary.resource),session/chatRemoved, andsession/chatUpdated(partial-update withPartial<ChatSummary>) — mirroring the root-channelroot/sessionAdded/root/sessionRemoved/root/sessionSummaryChangedpattern. RootStatenow carries an optional_metaproperty bag for implementation-defined metadata about the agent host itself, mirroring the MCP_metaconvention. A well-knownhostBuildkey may carry build information (version, commit, date) about the program hosting the agent host.
fetchTurnsandcompletionsnow target anahp-chat:channel;PROTOCOL_VERSIONbumped to0.4.0.ChatStateis now flat — the previoussummary: ChatSummarysub-object has been replaced by inlinedresource/title/status/activity/modifiedAt/model/agent/origin/workingDirectoryfields.ChatSummaryremains as the standalone catalog entry onSessionState.chats.ChatSummary.modifiedAtandChatState.modifiedAtare now ISO 8601 strings instead of numeric milliseconds.SessionSummarynow documents how its aggregate fields (status,activity,modifiedAt) are derived from the session's chats, includingInputNeeded/Errorpromotion when any chat raises the flag.
SessionState.turns,SessionState.activeTurn,SessionState.steeringMessage,SessionState.queuedMessages,SessionState.inputRequests(moved toChatState).session/chatsChangedfull-replacement action (replaced bysession/chatAdded/session/chatRemoved/session/chatUpdated).
Spec version: 0.3.0
McpServerCustomizationnow models MCP servers as first-class session customizations:enabled,state(a discriminatedMcpServerStateunion coveringstarting,ready,authRequired,error,stopped), an optionalchannelURI for anmcp://side-channel into the upstream server, and an optionalmcpAppblock carryingAhpMcpUiHostCapabilitiesso clients can render MCP Apps.McpServerAuthRequiredStatecarriesProtectedResourceMetadataplusreason/requiredScopes/description, letting clients drive the existingauthenticatecommand for per-MCP-server auth challenges.Customizationnow includesMcpServerCustomizationat the top level (hosts MAY surface globally-configured MCP servers directly rather than only inside a plugin or directory). MCP servers remain valid as children of a container.- New
session/mcpServerStateChangedaction — narrow upsert ofstate+channelon an existingMcpServerCustomizationby id, intended for the high-frequencystarting/ready/authRequiredtransitions. Other customization fields stay insession/customizationUpdatedterritory. InitializeParams.capabilities— optional client-capability bag declared during the handshake. First entry ismcpApps?: {}; hosts SHOULD only populateMcpServerCustomization.mcpApp/channelfor clients that declared it.- New guide page
docs/guide/mcp.md(with an MCP Apps subsection) and new spec pagedocs/specification/mcp-channel.md. - Added
changeKindtoChangeset(well-known values:'session','branch','uncommitted','turn','compare-turns') so clients can group, sort, or pick an icon without parsinguriTemplate. - Added
statusanderrortoChangesetOperationand a newchangeset/operationStatusChangedaction so servers can reflect an operation's execution lifecycle (idle → running → error) back into changeset state.
-
Replaced
ToolCallBase.toolClientId?: stringwith a discriminatedToolCallBase.contributor?: ToolCallContributorunion (ToolCallClientContributor/ToolCallMcpContributor) so MCP-served tool calls can be attributed back to their originatingMcpServerCustomization.session/toolCallStartcarries the newcontributor?field in place oftoolClientId?. -
Added optional
_metaprovider metadata toAgentCustomization. -
Added optional
changesfield of typeChangesSummarytoSessionSummary, carrying optionaladditions,deletions, andfilescounts so servers can advertise an at-a-glance view of a session's file-change footprint. -
Added a new annotations channel exposed on
ahp-session:/<uuid>/annotations. Annotations anchor to a(turnId, resource)pair with an optionalrange(omitted to anchor to the entire file), carry aresolvedflag (newly created annotations start unresolved), and always carry at least one entry. Clients drive every mutation by dispatching the client-dispatchableannotations/set,annotations/removed,annotations/entrySet, andannotations/entryRemovedstate actions directly — assigning theAnnotation.id/AnnotationEntry.idthemselves — rather than through RPC commands, so annotations inherit write-ahead replay and conflict resolution.SessionSummary.annotationsadvertises the per-sessionAnnotationsSummary({ resource, annotationCount, entryCount }) for badge UI. -
Added an
annotationsMessageAttachmentvariant (MessageAnnotationsAttachment) that references annotations on a session's annotations channel by itsresourceURI, optionally narrowed to anannotationIdsarray (omitted to reference every annotation). -
Removed the
additions,deletions, andfilesfields fromChangesetSummary. Aggregate counts now live onSessionSummary.changes; per-changeset views derive their own totals fromChangesetState.files. -
Moved the
changesetscatalogue fromSessionSummarytoSessionState. Thesession/changesetsChangedaction now updatesstate.changesetsdirectly instead ofstate.summary.changesets. -
Renamed the
ChangesetSummaryinterface toChangeset. The on-the-wire shape is unchanged. -
Renamed the
UserMessagetype toMessageand surfaced it consistently across turn state (Turn.message,ActiveTurn.message,PendingMessage.message) and the actions that carry it (session/turnStarted,session/pendingMessageSet). The type now carries anoriginfield and an optional_metaobject.
Spec version: 0.2.0
This is the first version released through the unified spec release pipeline
(spec/v* git tags → GitHub Release with attached schema artifacts). Changes
to the protocol shape that landed under this version are tracked in the
commits between spec/v0.1.0 (not yet tagged) and spec/v0.2.0. Highlights:
- Channels reorganization — every command and notification carries a top-level
channel: URI; per-channel state types and action unions live undertypes/channels-*/(see PR #97 and PR #152). - New
otlp/*notifications for telemetry export (exportLogs/exportTraces/exportMetrics). - New
session/agentChanged,session/customizationRemoved,session/changesetsChanged, and thechangeset/*action family. - Customizations redesigned as a typed two-level tree.
- New
resourceResolve(stat + realpath; throwsNotFoundfor the existence check) andresourceMkdir(mkdir -psemantics) requests. - New
createResourceWatchrequest plus theahp-resource-watch:/<id>channel with theresourceWatch/changedaction — long-lived file-change streams over the standard subscription mechanism. resourceWriteextended withmode(truncate|append|insert),position, andifMatchfor optimistic concurrency. NewConflict(-32011) error code for staleifMatchwrites.- The entire content-bearing
resource*family is now formally bidirectional — the methods appear inServerCommandMapand may be initiated by either peer (matches VS Code's existing implementation). UserMessage._metaoptionalRecord<string, unknown>field for provider-specific message metadata, mirroring the MCP_metaconvention already used onMessageAttachmentBase,ToolDefinition,ToolCallBase,UsageInfo, andSessionState.
Spec version: 0.1.0
Initial public protocol surface. Not retroactively tagged; this entry exists
for completeness so that the 0.2.0 diff is unambiguous.