Skip to content

RFD: Add flag config option type for boolean toggles#541

Open
fscarponi wants to merge 1 commit intoagentclientprotocol:mainfrom
fscarponi:fabrizio.scarponi/rfd-flag-config-option
Open

RFD: Add flag config option type for boolean toggles#541
fscarponi wants to merge 1 commit intoagentclientprotocol:mainfrom
fscarponi:fabrizio.scarponi/rfd-flag-config-option

Conversation

@fscarponi
Copy link

This RFD proposes adding a new flag type to session configuration options, enabling agents to expose simple boolean ON/OFF toggles as first-class config options alongside the existing select type.

Motivation

Currently, the only way to expose a boolean toggle (e.g., "Brave Mode", "Read Only", "Produce Report") is to use a select with two artificial options like "on"/"off". This forces clients to implement custom, non-agnostic logic to detect which selects are actually boolean flags — defeating the purpose of a standardized protocol.

A dedicated flag type allows clients to natively render toggle switches or checkboxes without guessing.

Proposed changes

  • SessionConfigFlag struct with current_value: bool
  • Flag variant in SessionConfigKind (discriminated by "type": "flag")
  • SessionConfigOptionValue untagged enum (String | Bool) for SetSessionConfigOptionRequest.value
  • Wire-level backward compatible: existing JSON payloads with string values remain valid

Working implementation

A reference implementation is available on the branch fabrizio.scarponi/flag-config-option, including updated docs, schema regeneration, and passing tests/clippy.

Happy to open a follow-up implementation PR once this RFD is reviewed and championed

@fscarponi fscarponi requested a review from a team as a code owner February 19, 2026 10:29
@benbrandt benbrandt moved this to Draft Proposal in Roadmap Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Draft Proposal

Development

Successfully merging this pull request may close these issues.

1 participant

Comments