Skip to content

[FEATURE]: Unified per-question and global comments for Question prompts #48820

Open

Description

@VeguiDev

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When answering questions in the Question tool, I often want to keep the predefined answer selected while also adding some context.

There are two slightly different cases:

  1. Context that belongs to a specific answer.
  2. Context that applies to the whole set of answers before submitting.

Today, if I want to qualify a predefined answer, I usually have to fall back to "Type your own answer" and restate the option manually.

There are existing proposals that cover parts of this:

I think these ideas could work well as a single, consistent interaction model.

Proposed UX

Per-question comment

After selecting a predefined option, pressing Tab would open or focus an optional comment input for that specific answer.

Example:

Which database?

> PostgreSQL
  MySQL
  SQLite

Comment:
> Use the existing Supabase instance

The selected answer remains PostgreSQL.

The comment is additional context attached to that answer rather than replacing it with a custom answer.

Global comment on Confirm

When reaching the final Confirm step, pressing Tab would open or focus another optional comment input that applies to the entire set of answers.

Example:

Confirm

Comment:
> Also keep backwards compatibility with the current API

Then Enter submits the answers together with the optional comments.

Why keep comments separate from answers?

I think preserving the predefined answer is useful.

For example, these should remain conceptually distinct:

  • Selected answer: PostgreSQL
  • Per-question comment: Use the existing Supabase instance
  • Global comment: Also keep backwards compatibility with the current API

This proposal does not prescribe a particular wire format or schema change.

The comments could be represented internally in whichever way best fits the existing Question implementation.

The important part is that, from the user's perspective, selecting an answer and adding context are separate actions.

Interaction

A simple interaction could be:

  • Tab on a selected answer → open/focus the per-question comment
  • Enter → save/continue
  • Tab on Confirm → open/focus the global comment
  • Enter on Confirm → submit everything
  • Esc while editing a comment → cancel/leave the comment input

The exact keybindings are open to discussion, but I think Tab fits naturally because it lets the user extend the current selection without replacing it.

Why this would help

This would make Question prompts more flexible without forcing users to abandon predefined answers whenever they need to add context.

It would also preserve the value of structured options while still allowing natural-language clarification when needed.

I'm happy to implement this and submit a PR if this interaction model is accepted.

Activity

  1. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Feature request titles must start with [FEATURE]: (e.g. [FEATURE]: Unified per-question and global comments for Question prompts)

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    These are the same two proposals you referenced yourself. This request appears to combine them into a single UX model, but the underlying features are already tracked there.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. changed the title [-]Unified per-question and global comments for Question prompts[/-] [+][FEATURE]: Unified per-question and global comments for Question prompts[/+] on Sep 13, 2026
  3. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets the contributing guidelines. We'll take a look.

  4. antonio-ivanovski commented on Oct 26, 2026

    @antonio-ivanovski

    Same need here, and it bites hardest on multi-question prompts: while reading question 2 I think of context that applies to the whole request, but the only free-text field belongs to question 1, so the note ends up attached to the wrong answer and the option I actually chose is replaced.

    A single optional note carried alongside the structured answers (the comments?: string shape proposed in #39410) would cover most of this. I'd use the global comment on nearly every multi-question prompt; per-answer comments are a good second step.

    Please keep this as the canonical thread — the earlier proposals were auto-closed for inactivity, not because the need went away. Since the reply is what clients consume, a wire-level field also makes this usable in GUI clients, not just the TUI. Happy to test a build.

  5. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed proposal, @VeguiDev! To restate it: when answering a Question prompt, you'd like to keep the predefined option selected and add an optional comment to that answer (for example, Tab on the option), plus an optional global comment on the Confirm step that covers all the answers. That way, adding context no longer means replacing the option with a custom answer.

    Maintainers will consider it. Earlier requests for parts of this, listed below, were all closed without being implemented, and this issue now brings both parts together:

    Currently a question's answer is just a list of strings (Question.Answer), so this would likely need an additive field for comments in the reply as well as the UI changes in the TUI and the app. A plugin can't add it today, because the question form is built into OpenCode and has no extension hook. If you'd like to work on a PR, it's probably best to wait for a maintainer to confirm the interaction model first.

  6. antonio-ivanovski commented on Oct 28, 2026

    @antonio-ivanovski

    Yes, something in these lines.
    Even I would go as further to have a preferred single choice or multi choice per question, but would allow the user to swap this and provide multi choose answer for a question, often time I need a hybrid between two.

  7. VeguiDev commented on Oct 28, 2026

    @VeguiDev
    Author

    I really like that idea! Allowing users to switch between single and multi-choice would be a great improvement.

    Another interesting addition could be conditional follow-up questions (an Answer Tree), where selecting an option reveals additional questions. This could make the Question tool much more flexible without requiring multiple agent interactions, although it would probably make more sense as a separate feature or future implementation.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions