Skip to content

docs(unstable): remove malformed-value handling from the spec text - #2891

Merged
benbrandt merged 1 commit into
mainfrom
docs/remove-malformed-value-handling
Nov 19, 2026
Merged

benbrandt merged 1 commit into
mainfrom
docs/remove-malformed-value-handling

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

The Rust types deserialize some fields leniently (DefaultOnError, VecSkipError), and the schema carries matching x-deserialize-* markers. That is SDK leniency toward non-conforming Clients and Agents. It is not protocol behavior and can change.

Several spec pages and schema descriptions described it anyway: "a malformed value is treated as omitted", "is skipped", "falls back to". One of those statements was also wrong. ToolCallCapabilities and TerminalCapabilities said a malformed value falls back to no controls, but a malformed capabilities value on an update is treated as omitted and the previous value stays.

This removes those statements. The pages and descriptions say what a conforming sender sends.

Changes

Stable v2 pages and schema descriptions

  • Capabilities: remove "A malformed value falls back to no controls" from ToolCallCapabilities and TerminalCapabilities.
  • Stop reasons: drop "malformed" from "omitted, null, malformed, or unknown" on the prompt lifecycle page, in the migration guide, and in the idle state_update descriptions.
  • Background work: drop "or it is malformed" on the prompt lifecycle page and "A malformed list is treated as not reported" from the four state update descriptions.
  • Session status: drop "malformed values" from the state description.
  • _meta: remove "Receivers treat any other value as omitted" from the extensibility page and the Meta description.
  • Unknown fields rule: remove "or change their documented handling of malformed values".
  • Config options: remove "Clients SHOULD hide a group that ends up empty, for example after skipping values they couldn't parse". A group can only be empty when the Agent breaks the MUST before it.

Draft pages and unstable features, v1 and v2

  • Cursors: remove the same "falls back" sentence from CursorCapabilities and "A malformed capabilities value is treated as omitted" from the draft pages.
  • Prompt suggestions: remove "a block it cannot parse" from the draft pages and "A Client skips an entry it cannot parse" from the description.
  • End-turn usage: remove "discard malformed usage rather than rejecting the idle transition".
  • Skill commands: remove "A Client treats an invalid value in one of these fields as absent".
  • mcp/message carrier: "Null or invalid values are treated as absent" now says omitted and null are equivalent.
  • v1 subagent idle update: drop "malformed" from its stop reason sentence.

RFDs

  • Background Work and Session Cursors: remove the notes on malformed background and capabilities values, with a revision entry in each.

AGENTS.md

  • Schema rules: the leniency attributes and their x-deserialize-* markers are not protocol behavior, so ignore them when writing or reviewing the spec.
  • Prose rules: don't say what a receiver does with a malformed value.

Not changed

  • Rules that reject a value, such as -32602 for malformed params.
  • The rule that a malformed value for a known discriminator is not treated as an unknown variant.
  • Rules for unknown values and unknown fields.
  • The stable v1 pages and schema/v1/schema.json.
  • The Rust deserialization and the x-deserialize-* markers. No behavior changes.
  • Other RFDs that describe leniency.

Checks

  • Clippy, the tests, rustdoc, Prettier, cargo fmt and the spell check pass.
  • Regenerating the schema a second time gives no diff.
  • All links and anchors in the changed pages resolve.

Tolerant deserialization (`DefaultOnError`, `VecSkipError`, and the
`x-deserialize-*` schema markers) is SDK leniency toward non-conforming
Clients and Agents. It is not protocol behavior and can change, so the
spec pages and schema descriptions no longer say what a receiver does
with a malformed value.

- Remove "a malformed value falls back to no controls" from
  `ToolCallCapabilities`, `TerminalCapabilities` and `CursorCapabilities`.
  It was also wrong for a malformed `capabilities` value on an update.
- Drop "malformed" from the stop reason, `background`, session status
  `state` and `_meta` statements on the pages, in the migration guide and
  in the schema descriptions.
- Remove the Client rule to hide an empty select group, and the notes on
  skipped prompt suggestions, skill fields and usage in the draft pages.
- Remove the same notes from the Background Work and Session Cursors RFDs.
- Add both rules to AGENTS.md.

Rules that reject a value, such as `-32602` for malformed params, are
unchanged. No behavior changes.
@benbrandt
benbrandt requested a review from a team as a code owner November 19, 2026 20:00
@benbrandt
benbrandt enabled auto-merge (squash) November 19, 2026 20:01
@benbrandt
benbrandt merged commit ccbce15 into main Nov 19, 2026
13 checks passed
@benbrandt
benbrandt deleted the docs/remove-malformed-value-handling branch November 19, 2026 20:04
@acp-release-bot acp-release-bot Bot mentioned this pull request Nov 19, 2026
benbrandt added a commit that referenced this pull request Nov 20, 2026
…2946)

The spec says what a conforming sender sends. It does not say what a
receiver does with a malformed value. #2891 removed that kind of text,
and these places were missed:

- Eleven v2 doc comments on `configOptions` and `availableCommands`
  said "Receivers treat `null` like omission" after the sender rule.
- The slash commands page said invalid command entries "are skipped".
- The tool calls page told Clients to ignore output data that is not
  valid base64, and let them strip `a/` and `b/` from a relative patch
  path. Both are sender rules already: `data` is base64, and patch
  paths are absolute with no prefix.
- The elicitation page told Clients to ignore a `default` that does not
  match its property schema, and said an unexpected `content` value
  invalidates only that property.
- The unstable `mcp/message` response description, in v1 and v2, said
  which outcome a receiver prefers when both are present.

The slash commands page and the migration guide also said "`null` is not
a valid outbound value". They now say "Agents MUST NOT send `null`", as
the session setup page does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant