Skip to content

Using emacs as editor + ctrl-g causes opencode to exit #9860

@line72

Description

@line72

Description

I am using terminal emacs (no X installed) as my editor by setting the environment variable: EDITOR=emacs.

When in opencode I can either press ctrl-x e or type /editor to open emacs and type in my comment. Everything normally works fine.

However, while in emacs, if I am working on a macro or some other command, it is common to press ctrl-g to stop the current operation. But doing so causes all of opencode to exit, with an error code of 130.

This is very annoying, as I am often in the middle of writing up a big prompt/response and I lose everything I was working on.

Note: I tried setting my editor to nano and am unable to reproduce this by pressing ctrl-g.

Plugins

N/A

OpenCode version

1.1.29

Steps to reproduce

  1. export EDITOR=emacs (In fedora, make sure you have emacs-nox package installed)
  2. In opencode, press ctrl-x e or /editor to start the editor
  3. While in emacs, press ctrl-g once

Screenshot and/or share link

Screencast.From.2026-01-21.11-42-41.mp4

Operating System

Fedora 43

Terminal

Alacritty (0.16.1) and gnome-terminal (3.56.3)

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions