anomalyco / anomalyco/opencode

Invalid key name: in opencode mini and various characters

Open
#42,408 1 comment 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 13, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When switching windows in tmux, after switching back to a terminal running opencode, I see a stacktrace and various characters typed in into the input window.

Plugins

none

OpenCode version

1.18.18

Steps to reproduce
  1. Start tmux
  2. Start opencode or opencode --mini
  3. Type prefix+s , typically ctrl+b+s in tmux to open tmux session switcher
  4. Switch to the same window
  5. Observe the error
Screenshot and/or share link

The following error in the logs is repeated like 100s times:

$ opencode --mini

█▀▀█  OpenCode
█  █  ~/myprojects/L_builtin
▀▀▀▀

000/0000[event-match-resolver-error] [Keymap] Error in event match resolver: 2 | import{Ab as Z0,Bb as XQ,zb as Q0}from"/$bunfs/root/chunk-g47at4xx.js";import{Gb as dZ,Hb as $Q,Ib as GQ,gc as aZ,hc as tZ,jc as eZ,nc as J0}from"/$bunfs/root/chunk-6ks53mkg.js";import{wc as nZ}from"/$bunfs/root/chunk-g290w9zp.js";import{tg as vQ}from"/$bunfs/root/chunk-dtfbyghv.js";import{XT as NQ}from"/$bunfs/root/chunk-fpne6rrn.js";var S2={};NQ(S2,{registerUnresolvedCommandWarnings:()=>mZ,registerTimedLeader:()=>QQ,registerTextareaMappingSuspension:()=>iZ,registerNeovimDisambiguation:()=>lZ,registerModBindings:()=>yZ,registerMetadataFields:()=>vZ,registerManagedTextareaLayer:()=>pQ,registerLeader:()=>gQ,registerExCommands:()=>fZ,registerEscapeClearsPendingSequence:()=>JQ,registerEnabledFields:()=>hZ,registerEmacsBindings:()=>xZ,registerEditBufferCommands:()=>rZ,registerDefaultKeys:()=>SZ,registerDefaultEventMatchResolver:()=>fQ,registerDefaultBindingParser:()=>kQ,registerDeadBindingWarnings:()=>bZ,registerCommaBindings:()=>eJ,registerBindingOverrides:()=>NZ,registerBaseLayoutFallback:()=>yQ,registerBackspa | ... truncated

error: Invalid key name: key name cannot be empty
      at X0 (/$bunfs/root/chunk-shrt7wh3.js:2:2135)
      at HQ (/$bunfs/root/chunk-shrt7wh3.js:2:2220)
      at uJ (/$bunfs/root/chunk-shrt7wh3.js:2:2457)
      at resolveKey (/$bunfs/root/chunk-shrt7wh3.js:2:44824)
      at xQ (/$bunfs/root/chunk-shrt7wh3.js:2:79445)
      at H (/$bunfs/root/chunk-shrt7wh3.js:2:55613)
      at wJ (/$bunfs/root/chunk-shrt7wh3.js:2:49357)
      at EJ (/$bunfs/root/chunk-shrt7wh3.js:2:48612)
      at <anonymous> (/$bunfs/root/chunk-shrt7wh3.js:2:70091)
      at emitWithPriority (/$bunfs/root/chunk-dtfbyghv.js:26:10165)
      at processParsedKey (/$bunfs/root/chunk-dtfbyghv.js:26:9634)
      at handleStdinEvent (/$bunfs/root/chunk-dtfbyghv.js:93:5055)
      at <anonymous> (/$bunfs/root/chunk-dtfbyghv.js:93:4924)
      at drain (/$bunfs/root/chunk-dtfbyghv.js:32:8396)
      at drainStdinParser (/$bunfs/root/chunk-dtfbyghv.js:93:4896)
      at <anonymous> (/$bunfs/root/chunk-dtfbyghv.js:93:2753)
      at emit (node:events:95:22)
      at addChunk (internal:streams/readable:264:47)
      at readableAddChunkPushByteMode (internal:streams/readable:242:18)
      at internalRead (38:40)
Operating System

Windows 11 -> wsl -> ubuntu 26.04 LTS -> tmux 3.6a , no tmux config

Terminal

Terminal Windows 1.24.11911.0,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.