Skip to content

Unanswered question disappears from UI after OpenCode restart #15172

Closed as not planned

Description

@aklajnert

Description

When restarting OpenCode with an unanswered question in the session, reopening the same session no longer shows that question in the UI (both GUI and TUI). I can still see in the context that the last message was a question, but the visible conversation omits it, so I cannot continue answering it directly.

Expected behavior:
The unanswered question should still be visible in the conversation UI so I can answer it and continue the tool flow.

Actual behavior:
The last question is present in the context, but it is not rendered in the UI/TUI, so I cannot answer it and must send a new prompt referencing the original question.

Why it matters:
For GitHub Copilot, answering via the question tool does not consume a premium request, but sending a new prompt does, so this bug forces unnecessary extra premium usage.

Plugins

none

OpenCode version

v1.2.14

Steps to reproduce

  1. Create a new session, use a prompt like: "Ask me a question using question tool"
  2. Restart opencode without answering the question
  3. Go back to the same session

Screenshot and/or share link

You can see that the question is there, just not shown by OpenCode:
Image

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 26, 2026
  2. andreigiura commented on Mar 5, 2026

    @andreigiura

    I have encoutered the same problem using kimi k2.5.

  3. axsuul commented on Mar 6, 2026

    @axsuul

    ran into this too. dug into the code and here's what's happening:

    the pending question state lives entirely in-memory as Promise resolve/reject callbacks in question/index.ts. when the process restarts, that map is gone. worse, the processor cleanup loop (processor.ts:378-394) actively marks any running/pending tool parts as error: "Tool execution aborted", so the question ToolPart gets overwritten before anyone can recover it.

    the thing is, the ToolPart on disk does contain the full question input (questions, options, headers) in state.input while it's in running status. so all the info needed to re-show the question is already persisted, it just gets destroyed on cleanup and nobody tries to restore it.

  4. aklajnert commented on Mar 7, 2026

    @aklajnert
    Author

    I have already created a PR for this (#15603) , but it got buried in the queue.

  5. tredondo commented on Mar 12, 2026

    @tredondo

    Just ran into this in 1.2.24. Hope your PR gets reviewer @aklajnert .

  6. assigned and unassigned on Apr 26, 2026
  7. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  8. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Contributor

    Automated: closing question issues.

    GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.

    If this is a bug or feature request, please open a new issue with the appropriate template.

  9. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Contributor

    Reopening – this was incorrectly closed by automated question-issue cleanup. Sorry for the noise.

  10. tredondo commented on Jun 24, 2026

    @tredondo

    For help & questions: https://discord.gg/opencode

    @rekram1-node are Discord help Q&A indexed by search engines/LLMs?

  11. github-actions commented on Aug 24, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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