Skip to content

Conversation

@chazcb
Copy link
Contributor

@chazcb chazcb commented Jan 22, 2026

Summary

Proposal for allowing Agents to declare input options they accept for session/new and session/load requests, advertised in InitializeResult capabilities.

Uses MCP elicitation's JSON Schema format for defining input schemas, providing ecosystem consistency.

Key Design Decisions

  • Discovery at init time: Input schemas are advertised in InitializeResult.capabilities.sessions, enabling clients to show configuration UI before session creation
  • Elicitation schema format: Uses the same JSON Schema subset as MCP elicitation for type definitions, encouraging ecosystem alignment
  • Separate schemas: Distinct schemas for newSession vs loadSession operations
  • All options optional: Agents must provide sensible defaults

Why not pure elicitation?

We considered using MCP elicitation directly (server requests input after session/new), but this has UX tradeoffs:

  • Session enters "pending" state during elicitation
  • Clients can't show configuration UI proactively
  • Discovery requires starting a session first

By advertising schemas at init time, clients can build configuration UIs that feel native rather than reactive.

Related

  • Uses schema format from MCP Elicitation
  • Complements Session Config Options (runtime configuration during a session)

@chazcb chazcb changed the title Add RFD: Session Input Options Discovery RFD: Session Input Options Discovery Jan 24, 2026
@chazcb chazcb marked this pull request as ready for review January 27, 2026 12:38
@chazcb chazcb requested a review from a team as a code owner January 27, 2026 12:38
@chazcb chazcb force-pushed the chazcb/session-input-options branch from 59e4455 to 70166f4 Compare January 27, 2026 12:43
@chazcb
Copy link
Contributor Author

chazcb commented Jan 27, 2026

Planning to update to:

  1. Ensure that enums ("select") matches the select from Session Config Options feat: Stabilize Session Config Options #411
  2. Change "hint" to "name" for consistency with Session Config Options
  3. Update to clarify that there are two proposals in here: 1 for the richer options schema and 1 for session/new session/load config options

I might split the two proposals out in the near future depending on need!

Copy link
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for kicking this off! A few thoughts:

  • Without a breaking change, we definitely would need to make sure no inputs are required (could revisit as a v2 protocol version)
  • Session Config options were purposely a bit restricted since they need to encapsulate not only what config options are available, but also their current state, since they are "live" forms so to speak, and can be updated by both the user and the agent
  • I wonder if we should somehow treat new/load options more similarly to MCP elicitation #376 since we likely want some more flexibility, and this is more of an input form to be filled out once that doesn't have the same state considerations of session config

MCP elicitation takes a JSON Schema approach, but is much more restricted to limit the client burden. We need to support it anyway for MCP support + other agent needs like asking users specific questions, so I guess my thought is: if the client supports elicitation, could we use the same thing to also support requesting additional inputs from the user when starting a session?

I like the approach of keeping this as similar as possible to session config, but I also wonder if this is a different enough use case, we can actually make it more similar to elicitation instead.

Another thought: could the agent do an elicitation post new thread happening to request more configuration if needed before the user sends a prompt?

And another: are these config options something we as clients should show on every new session? Or do some of these configuration options only need to be set on first load if configuration hasn't been set yet? And the defaults carry over unless a user wants to change them?

"agentCapabilities": { ... },
"agentInfo": { ... },
"configOptions": {
"session/new": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can somehow come up with a more structured way of handling this since we know which resources this affects, but maybe it is also fine to tie this to method names since those are stable enough. Just recording my indecision 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100% agree 😂

type: "select";
defaultValue?: string | number | boolean | null;
options: Array<{
value: string | number | boolean | null; // Machine-readable value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: why allow for multiple value types here and not just strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on our internal simplified JSON schema. I didn't realize that elicitation also uses a simplified schema, so love the idea of moving to that instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool yeah I think it will allow clients and agents to reuse UI + validation logic for this stuff if we can keep it closer, and I suspect it will likely cover what we need here

```typescript
interface SelectOption extends ConfigOptionBase {
type: "select";
defaultValue?: string | number | boolean | null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this being optional indicate that this is a required field if no default is provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the intention is that none of these fields are required. This defaultValue is intended to be a hint to the client about what the agent might use if the field is not filled out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. This will be one difference from the elicitation json schema which is it will not be allowed to have "required" fields.
But I think we can learn a lot from this and potentially allow required fields later if it feels useful

type: "multiselect";
defaultValue?: Array<string | number | boolean | null>;
options: Array<{
value: string | number | boolean | null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same value question here

chazcb and others added 4 commits February 4, 2026 09:39
Proposal for allowing Agents to declare what input options they accept
for session/new and session/load requests in InitializeResponse.

This complements the existing Session Config Options RFD:
- Input Options: Discovery of options for session creation/loading
- Config Options: Runtime configuration during a session

Key features:
- JSON Schema subset for rich type definitions
- Separate schemas for newSession vs loadSession
- Enables dynamic client UIs for session configuration
- All options are optional - Agents must provide defaults

Co-Authored-By: Claude <[email protected]>
- Add `hint` for UI guidance (placeholder text, input hints)
- Add `default` for declaring default values agents will use
- Update examples to demonstrate usage
- Add open question about whether both description and hint are needed

Co-Authored-By: Claude <[email protected]>
- Change schema format from custom types to JSON Schema 2020-12 subset
- Rename configOptions (schema) to configSchema in InitializeResponse
- Add alternatives considered section documenting post-session elicitation
- Reference MCP elicitation spec instead of duplicating schema details

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@chazcb chazcb force-pushed the chazcb/session-input-options branch from 3b65b61 to 147bb5a Compare February 4, 2026 15:42
@chazcb chazcb changed the title RFD: Session Input Options Discovery RFD: Session Input Options Feb 4, 2026
chazcb and others added 2 commits February 4, 2026 12:14
- Use MCP elicitation JSON Schema format (no need to redefine)
- Clarify status quo: _meta workarounds, no discovery or standard config field
- Move elicitation alternatives to "Alternatives Considered" section
- Streamline document to focus on init-time discovery proposal

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

2 participants