anomalyco / anomalyco/opencode

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

Open
#48,820 2 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 13, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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:

  • #38295 — extending a selected option with additional text
  • #39410 — adding a global comment before Confirm

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.