Skip to content

Feature Request: ask_user enum/oneOf fields should always offer an 'Other / custom answer' escape hatch #3323

Description

@loganrosen

Describe the feature or problem you'd like to solve

The ask_user tool requires each field to be either a fixed enum/oneOf (no escape hatch) or a fully open-ended string (no suggestions). There's no way for the agent to offer suggested choices while still letting the user provide a custom answer on the same field.

When the agent doesn't know all the valid answers in advance, it has to either:

  1. Guess at an enum (forcing the user into one of the agent's guesses), or
  2. Use a plain string field (giving the user no guidance), or
  3. Manually add an "Other" / "I don't know" value to the enum (which the agent often forgets to do)

If the user picks "decline" to escape, they lose all their other field inputs, not just the one they don't know.

Proposed solution

Adopt the pattern Claude Code's AskUserQuestion uses: the tool runtime automatically appends an "Other" option to every multiple-choice question, which opens a freeform text input. The agent declares structured suggestions; the runtime guarantees the user can always escape with a custom answer.

From the Claude Code system prompt (extracted from the binary):

"Users will always be able to select 'Other' to provide custom text input"

"The available choices for this question. ... There should be no 'Other' option, that will be provided automatically."

For Copilot CLI's ask_user, this could be:

  • On string fields with enum/oneOf: render an additional "Other..." option that opens a freeform input.
  • On array fields with enum/anyOf (multi-select): same — an "Other..." entry that opens freeform.
  • The agent declares enum choices as before; the runtime adds the escape hatch.

Alternative (less elegant): add an allowOther: true field on the schema, or document a convention that the agent must include "Other (please specify)" in every enum. But the auto-injection approach matches Claude Code's prior art and means agents don't have to remember.

Example prompts or workflows

A user asks me to create a service account YAML and I need to know which orgs it should belong to. I know the common orgs but not which ones apply to this specific service account.

Current behavior — I either:

  • List the orgs I know as a multi-select enum, forcing the user to pick from my guess, OR
  • Use a plain string field "comma-separated org names", losing autocomplete-style guidance

Desired: I offer the common orgs as suggested choices, the runtime adds an "Other..." escape, and a user who doesn't know can either pick a sensible default I marked or type whatever's appropriate.

Additional context

Related: #2067 (multiline freeform input). That's a different but adjacent gap — even today's freeform string fields are single-line only.

Activity

  1. added
    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
    on May 15, 2026
  2. added theissue type on May 15, 2026
  3. saugion commented on Aug 25, 2026

    @saugion

    Widening this a bit: today the ask_user tool's choices field is a flat string[] with no way to select more than one entry — there's no allow_multiple (or similar) flag at all, so this isn't just missing an "Other" escape hatch on single-select, it's a full gap for multi-select questions.

    Confirmed from the shipped SDK bundle (@github/copilot/sdk/index.js, CLI 1.0.80):

    h_e = x.object({
      question: x.string().describe("... Ensure only one question is asked at a time - do not bundle multiple questions together."),
      choices: x.array(x.string()).optional().describe("Optional list of choices for a multiple choice question. Prefer providing choices when possible."),
      allow_freeform: x.boolean().optional().describe("Whether to allow freeform text input in addition to choices. Defaults to true.")
    })

    Two things this schema can't express that Claude Code's AskUserQuestion can:

    1. Multi-select — no allow_multiple: boolean (or min/max selections) on choices, so any question with more than one valid answer (e.g. "which modules does this touch?") has to be asked as N separate single-choice questions, or degrade to freeform "type a comma-separated list."
    2. Batching — the tool description explicitly discourages bundling multiple questions in one call, whereas AskUserQuestion accepts up to 4 questions (each independently single/multi-select) per call, cutting round-trips substantially for multi-field forms.

    Concrete proposal, additive and backward-compatible:

    h_e = x.object({
      question: x.string().describe(...),
      choices: x.array(x.string()).optional().describe(...),
      allow_multiple: x.boolean().optional().describe("Whether the user may select more than one choice. Defaults to false."),
      allow_freeform: x.boolean().optional().describe(...)
    })

    allow_multiple: true + the "Other" escape hatch from this issue would cover both gaps together — happy to help think through the terminal rendering (checkbox list vs radio list) if useful, since this is closed-source and I can't send a PR directly.

  4. copilot-cli-bot commented on Sep 29, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.89. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions