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

Open
opened 2026-02-16 18:06:10 -05:00 by yindo · 2 comments
Owner

Originally created by @line72 on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

https://github.com/user-attachments/assets/32010251-8aa7-410f-8258-d80cb7fe7687

Operating System

Fedora 43

Terminal

Alacritty (0.16.1) and gnome-terminal (3.56.3)

Originally created by @line72 on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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 https://github.com/user-attachments/assets/32010251-8aa7-410f-8258-d80cb7fe7687 ### Operating System Fedora 43 ### Terminal Alacritty (0.16.1) and gnome-terminal (3.56.3)
yindo added the opentuibug labels 2026-02-16 18:06:10 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

For keybind-related issues, please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Jan 21, 2026): For keybind-related issues, please also check our pinned keybinds documentation: #4997
Author
Owner

@line72 commented on GitHub (Jan 21, 2026):

I have look at #4997 and do not think this is related.

@line72 commented on GitHub (Jan 21, 2026): I have look at #4997 and do not think this is related.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7092