Repository navigation
Description
- I have verified this feature I'm about to request hasn't been suggested before.
Problem
The question prompt's Confirm screen shows a clean review of every selected answer and then submits. Two gaps make the flow awkward in practice:
Gap 1 — No place to add global comments before confirming
Often the right answer is one of the presented options plus a short free-form note that applies to the whole request, not to any single option. Today the only free-text input is the per-question "Type your own answer" row, which forces the user to abandon the option they just picked and retype the whole thing including their context. This is especially painful in plan mode, where the user is triaging a proposed plan and wants to say "approve, but also…" or "no, because…" alongside their selection.
Concrete examples:
- Agent asks "Which auth approach should we use?" → user picks "JWT" → user wants to add "but only if the cookie domain is scoped to the app, not
*.example.com". Today they have to type the entire sentence into the custom-answer row, losing the chosen option. - Plan-mode Yes/No confirmation → user wants to write "yes, but please move the migrations to a separate PR". The current UI offers no input slot for this.
Gap 2 — "Type your own answer" is hidden whenever the model sets custom: false
The UI only renders the custom-answer row when custom !== false on each Question.Info. The model is instructed not to set custom: false (see packages/opencode/src/tool/question.txt), but nothing structurally prevents it from doing so — and in practice the row sometimes disappears. The user then has no way to break out of the canned options.
Proposed solution
Two coupled changes:
1. New Comments tab before Confirm
Add a tab labeled "Comments" in the tab row, positioned right before the final Confirm tab. It opens a multi-line textarea so the user can write free-form notes that apply to the whole question request (not to one specific option). On Confirm, the textarea content is sent to the agent alongside the selected answers, so the model sees:
User has answered your questions:
- Q1 header: <selected labels / typed text>
- Q2 header: <selected labels / typed text>
Additional user comments: <textarea content>
The Comments tab is shown only when there is more than one question in the request, mirroring how the existing Confirm tab is hidden in single-question mode (multi-question prompts are where the global comment is most useful; single-question prompts already have the per-question custom-answer row).
2. Always render "Type your own answer"
Make the per-question "Type your own answer" row always visible in the question UI, regardless of the custom flag on Question.Info. The schema keeps the field for backward compatibility, but the UI no longer gates the row on it. The model is still told (in question.txt) that custom answers are added automatically.
This is a UI-only change — no schema change required.
Wire shape (additive)
To carry the global comment, extend the reply payload additively. The new field is optional so existing clients keep working:
- Question.Reply = { answers: Question.Answer[] }
+ Question.Reply = { answers: Question.Answer[], comments?: string }The question tool formats the comment into the tool's reply string so the model sees both the per-question answers and the global note in one block.
Why this complements existing issues
- [FEATURE]: Allow custom comment in
Asking Question#8930 (closed): same intent ("allow custom comment in Asking Question"), closed as a duplicate without a working solution — this proposal carries the same idea forward with a concrete wire shape. - [FEATURE]: Allow optional text qualifier when selecting a Question tool option - UX #17108 (closed): text qualifier per option — orthogonal. Per-option qualifiers and a global comment box both have value.
- [FEATURE]: Add
inputfield to question tool options for inline text input #30028 (open): inlineinputfield on specific options — model-driven, requires a schema change. The Comments tab is user-driven and additive. - [FEATURE]: Tab to extend a question option into a custom answer #38295 (open): Tab to extend a question option into a custom answer — orthogonal; extends a single option in place. The Comments tab extends the whole request before confirmation.
- [FEATURE]: Auto-enter edit mode when typing on 'Type your own answer' in question prompt #34476 (open): auto-enter edit mode on "Type your own answer" — UX detail on the per-question row that we are already keeping.
The three proposals (#30028, #38295, this one) are complementary and can ship independently.
Files this will touch
packages/schema/src/question.ts— additivecomments?: stringonQuestion.Replypackages/schema/src/v1/question.ts— mirror the additive change for V1 compatpackages/opencode/src/cli/cmd/run/question.shared.ts— extend the state machine with anextrasfield and tabpackages/opencode/src/cli/cmd/run/footer.question.tsx— render the new tab, the textarea view, and the new keyboard hintspackages/opencode/src/tool/question.ts— format the global comment into the tool's reply stringpackages/opencode/src/question/index.ts— propagatecommentsthrough the reply servicepackages/opencode/src/server/routes/instance/httpapi/groups/question.ts+ handler — accept the optionalcommentsfield onPOST /:requestID/replypackages/opencode/src/tool/question.txt— update the model-facing description to mention the always-on custom rowpackages/tui/src/routes/session/question.tsx— mirror the change in the legacy TUIpackages/app/src/pages/session/composer/session-question-dock.tsx— mirror the change in the App dock (header tabs + textarea)packages/ui/src/i18n/en.ts— addui.question.comments.placeholder,ui.question.comments.tabstrings
Happy to send a PR against dev once the direction is blessed. I can split this into separate PRs (schema → TUI → App) if maintainers prefer a narrower review surface.
This issue is being opened from a community fork (airvzxf/opencode) for design review before implementation. Implementation will be sent as a PR against anomalyco/opencode's dev branch.
Activity
airvzxf commentedon Jul 29, 2026
Heads-up—implementing this in PR airvzxf/opencode#1. The PR takes a different shape than the original proposal in this issue (auto-append a
textOnlyquestion inside the existing questions array, no new wire field). Reasoning and side-by-side comparison live in the PR body—a short version: avoids aReplyschema change and an HTTP API migration, and the auto-append fires for 1-question prompts too (this issue's tab approach intentionally hides Comments for single-question prompts).If the maintainer prefers the original
comments?: string+ dedicated tab approach, I can rework on top of the same branch; the second commit (the summary-view fixup) would then revert cleanly. Closing this issue from the PR (Closes #39410) when upstream merges.Demo (terminal recording of the full flow):
Screenshots in the PR body are hosted on the fork's release airvzxf/opencode
assets/comments-screenshots-2026-07-29(asset bucket only—no code, no commits).github-actions commentedon Sep 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
antonio-ivanovski commentedon Oct 26, 2026
Still relevant. Closing for inactivity doesn't remove the gap, and the auth example here is exactly my case: I want to pick "JWT" and add a condition on cookie scope, but the only way today is to retype everything under "Type your own answer", which also hides that I picked the offered option.
The additive
comments?: stringon the reply is the right shape, and it's what #48820 now tracks. I hope the Comments-tab idea gets revived there rather than staying closed.