Skip to content

Unable to Exit OpenCode TUI When Configuration Errors Occur #4245

Closed as duplicate

Description

@Hipfox

Description

When OpenCode encounters a command or agent configuration error during startup, the TUI displays the error message but becomes unresponsive to normal exit commands. Users are unable to exit the application using standard methods and must resort to killing the process manually.

OpenCode version

1.0.61

Steps to reproduce

Create an invalid configuration in directory with incorrect command/agent settings
Launch OpenCode TUI with opencode
Observe that an error message is displayed
Attempt to exit using normal methods:
    /exit, /quit, or /q commands
    Ctrl+C interrupt
Notice that none of these methods work

Expected Behavior

When a configuration error occurs, OpenCode should either:

Validate configuration before launching the TUI and exit at the CLI level with an error message
Provide a functional exit mechanism even when in an error state
Respond to standard interrupt signals like Ctrl+C

Actual Behavior

The TUI enters an error state where it displays the configuration error but does not respond to any exit commands or keybindings. The terminal is taken over by the TUI, but the error handling logic does not provide a way to exit gracefully.

Workaround

Users must manually kill the OpenCode process:

kill <opencode-pid>

Suggested Fix

Consider adding early configuration validation before TUI initialization, or ensure that exit commands remain functional even when the application is in an error state.

Screenshot and/or share link

No response

Operating System

VM: Arch Linux(OpenCode 1.0.61)

Terminal

Host:Windows(Windows Terminal Version: 1.23.12811.0)

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 12, 2025
  2. github-actions commented on Nov 12, 2025

    @github-actions
    Contributor

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

    The common pattern across these issues is TUI becoming unresponsive to standard exit commands when in error states, requiring manual process termination.

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 12, 2025

    @rekram1-node
    Contributor

    Your issue was made first but the newer one has more activity so im just gonna close this one and use the other one: #4246

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

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions