Elevator pitch
Add a newboolean type to session configuration options, enabling agents to expose simple ON/OFF toggles (e.g., “Brave Mode”, “Read Only”, “Produce Report”) as first-class config options alongside the existing select type.
Status quo
Currently,SessionConfigKind only supports the select type, which allows agents to expose dropdown-style selectors with a list of named values. This works well for choosing models, modes, or reasoning levels.
However, there is no native way to represent a simple boolean on/off toggle. To expose a boolean option today, agents must use a select with two artificial options (e.g., “on”/“off”), and clients need custom, non-agnostic logic to detect that a particular select is actually a boolean toggle. This defeats the purpose of a standardized protocol.
What we propose to do about it
- Add a
SessionConfigBooleanstruct with acurrent_value: boolfield - Add a
Boolean(SessionConfigBoolean)variant to theSessionConfigKindenum, discriminated by"type": "boolean" - Add a
SessionConfigOptionValueinternally-tagged enum so thatSetSessionConfigOptionRequestcan carry both string values (forselect) and boolean values (forboolean) with an explicittypediscriminator - Provide convenience constructors and
Fromimpls for ergonomic usage - Update documentation and regenerate schema files
Shiny future
Clients can natively render boolean config options as toggle switches or checkboxes, without any custom logic. Agents can expose options like “Brave Mode”, “Produce Report”, or “Read Only” in a standardized way that any ACP-compliant client understands out of the box.Implementation details and plan
Wire format: declaring a boolean option
In asession/new response (or any response containing configOptions):
Wire format: setting a boolean option
Thesession/set_config_option request carries a type discriminator alongside the value. The type field describes the shape of the value, not the option kind.
When type is absent the value is treated as a SessionConfigValueId string, preserving backwards compatibility with existing clients:
type field can be omitted (defaults to value_id):
select:
SessionConfigBooleanstruct withcurrent_value: boolBoolean(SessionConfigBoolean)variant inSessionConfigKind(tagged via"type": "boolean")SessionConfigOptionValueenum using#[serde(tag = "type")]with a#[serde(untagged)]fallback variant — the same pattern asAuthMethod:Boolean { value: bool }— matched whentypeis"boolean"ValueId { value: SessionConfigValueId }— untagged fallback whentypeis absent or unrecognised
SessionConfigOptionValueis flattened (#[serde(flatten)]) ontoSetSessionConfigOptionRequest, producing top-leveltypeandvaluefields on the wire- The
valuefield type change inSetSessionConfigOptionRequestis gated behind#[cfg(feature = "unstable_boolean_config")]— without the feature the field remainsSessionConfigValueId Fromimpls (&str,SessionConfigValueId,bool) ensure ergonomic construction- Wire-level backward compatible: existing JSON payloads without a
typefield remain valid via the untagged fallback
Client capabilities
Per the existing protocol design, clients that receive a config option with an unrecognizedtype should ignore it. Since the agent is required to have a default value for every option, the agent can function correctly even if the client doesn’t render or interact with the boolean option. No new client capability negotiation is needed.
Frequently asked questions
What alternative approaches did you consider, and why did you settle on this one?
We considered reusing the existingselect type with a convention (e.g., options named “on”/“off”), but this would require clients to implement non-agnostic detection logic, which contradicts the goal of a standardized protocol. A dedicated boolean type is cleaner and lets clients render the appropriate UI control without guessing.
Is this a breaking change?
On the wire/JSON level: no. Whentype is absent the value is treated as a SessionConfigValueId, so existing payloads deserialize correctly. On the Rust API level: the type of SetSessionConfigOptionRequest.value changes, but this is gated behind unstable_boolean_config. Without the feature flag the stable API is unchanged. With the feature flag, From impls ensure source compatibility for users of the new() constructor.
Revision history
- 2026-02-24: Initial proposal
- 2026-03-05: Updated to reflect final implementation —
flagrenamed toboolean, value type changed from untaggedString | Boolenum to internally-tagged enum withtypediscriminator and untaggedValueIdfallback, feature-gated behindunstable_boolean_config