Skip to content

bug: Esc will change the terminal to Normal mode, but Esc twice is necessary for interrupting opencode #145

@tamlok

Description

@tamlok

Did you check docs and existing issues?

  • I have read the plugin docs
  • I have read the opencode docs
  • I have searched the existing plugin issues
  • I have searched the existing opencode issues

:checkhealth opencode output

============================================================================== opencode: 3 ⚠️ opencode.nvim ~ - ✅ OK nvim version: 0.11.5+g9fa7c0a046. - ✅ OK opencode.nvim git commit hash: 364c7336562329f6c901629710070ea6ae256e3b. - ✅ OK vim.g.opencode_opts: {} opencode.nvim [binaries] ~ - ✅ OK opencode available with version INFO 2026-01-25T13:57:58 +102ms service=models.dev file={} refreshing. - ⚠️ WARNING opencode version has a major version mismatch with latest tested version 1.1.11: may cause compatibility issues. - ✅ OK curl available. opencode.nvim [snacks] ~ - ✅ OK snacks.input is enabled: ask() will be enhanced. - ✅ OK blink.cmp is available: opts.ask.blink_cmp_sources will be registered in ask(). - ✅ OK snacks.picker is enabled: select() will be enhanced. opencode.nvim [providers] ~ - ✅ OK Configured opencode provider: snacks. - ✅ OK The snacks provider is available. - ⚠️ WARNING The kitty provider is not available — KITTY_LISTEN_ON environment variable is not set. - ADVICE: - Enable remote control in kitty. - ✅ OK The wezterm provider is available. - ⚠️ WARNING The tmux provider is not available — tmux executable not found in $PATH. - ADVICE: - Install tmux and ensure it's in your $PATH. - ✅ OK The terminal provider is available.

Describe the bug

Esc twice is necessary for interrupting opencode session. However, it seems that Esc will turn the terminal (running opencode) into normal mode. How to supress that setup?

Thanks!

Steps To Reproduce

  1. Open opencode pane
  2. type something to let the opencode thinking
  3. try to interrupt the opencode by pressing Esc twice
  4. Failed to interrupt the opencode

Expected Behavior

We should Esc twice to interrupt the opencode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions