Skip to content

Ctrl-C doesn't clear the input, it crashes the app instead #8

@tnglemongrass

Description

@tnglemongrass

Description

On Windows11 built-in terminal:

  1. opencode.cmd
  2. type 'hello' (without sending)
  3. press Ctrl-C

Expected:

  • clears the input, opencode still running

Actual:

  • the app crashes, user is thrown back at Windows Terminal prompt, mouse movements produce strange ANSI-characters

Interesting:

  • Ctrl-D and /exit work fine
  • The following fix helps (but probably breaks other functionality):
--- a/packages/opencode/src/cli/cmd/tui/thread.ts
+++ b/packages/opencode/src/cli/cmd/tui/thread.ts
@@ -156,9 +156,9 @@ export const TuiThreadCommand = cmd({
       },
     })

-    // setTimeout(() => {
-    //   client.call("checkUpgrade", { directory: cwd }).catch(() => {})
-    // }, 1000)
+    setTimeout(() => {
+      client.call("checkUpgrade", { directory: cwd }).catch(() => {})
+    }, 1000)

     await tuiPromise
   },

Plugins

none

OpenCode version

latest dev branch:

commit d6c5ddd6dc835c4d0a3118350b92d7a9d03d7f22 (origin/dev, origin/HEAD, dev)
Author: GitHub Action <action@github.com>
Date:   Fri Jan 23 12:05:37 2026 +0000

    ignore: update download stats 2026-01-23

Steps to reproduce

see above

Screenshot and/or share link

none

Operating System

Windows 11

Terminal

Built-In Windows Terminal App

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions