Skip to content

Add protocol version negotiation to agent/initialize #25

Description

@aniketwattamwar

Problem

There is no protocol version anywhere in the wire format. agent/initialize exchanges a name and an empty capabilities object, so a runtime cannot tell whether it is talking to an agent built against today's spec or one from six months ago. There is no safe way to ever make a breaking change.

Proposal

Both directions carry protocol_version, a MAJOR.MINOR string, deliberately decoupled from the package version.

  • Runtime sends the highest version it speaks
  • Agent responds with the version it will actually speak
  • Differing major → runtime aborts with a clear error
  • Differing minor → both operate at the lower minor
  • Absence means 0.1 — every agent built against the current SDK keeps working

Acceptance criteria

  • protocol_version in initialize params and result
  • Legacy agents (no field) still run, with a single warning
  • Major mismatch aborts with error -32001, not a confusing failure
  • Spec, docs/spec.md, and schemas updated

See ECP-0001 phase 1. This is the only roadmap item with a closing window — it gets harder with every agent built against a versionless protocol.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

protocolWire format / spec changes

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions