Skip to content

[BUG] MaxListenersExceededWarning #31622

Closed as not planned
Closed as not planned

Description

@pwillis-oi

Description

Had opencode serve running in a screen session for a few days; came back to it today and saw warning errors in terminal output

Plugins

none

OpenCode version

1.5.11

Steps to reproduce

  1. Run OpenCode in server mode for a while
  2. Open a couple projects
  3. Work on different sessions in different projects
  4. Server mode eventually issues warnings in output

Screenshot and/or share link

17:21 $ opencode-serve
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://127.0.0.1:4096
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [DL]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
 emitter: DL {
  _events: [Object ...],
  _eventsCount: 1,
  _maxListeners: undefined,
  [Symbol(kCapture)]: false,
  emit: [Function: emit],
  setMaxListeners: [Function: setMaxListeners],
  getMaxListeners: [Function: getMaxListeners],
  addListener: [Function: addListener],
  on: [Function: addListener],
  prependListener: [Function: prependListener],
  once: [Function: once],
  prependOnceListener: [Function: prependOnceListener],
  removeListener: [Function: removeListener],
  off: [Function: removeListener],
  removeAllListeners: [Function: removeAllListeners],
  listeners: [Function: listeners],
  rawListeners: [Function: rawListeners],
  listenerCount: [Function: listenerCount],
  eventNames: [Function: eventNames],
},
    type: "event",
   count: 11,

      at overflowWarning (node:events:185:19)
      at addListener (node:events:158:22)
      at ~effect/Effect/evaluate (/$bunfs/root/chunk-0t4e2mg7.js:25:4492)
      at runLoop (/$bunfs/root/chunk-0t4e2mg7.js:25:2045)
      at evaluate (/$bunfs/root/chunk-0t4e2mg7.js:25:1435)
      at runTasks (/$bunfs/root/chunk-0t4e2mg7.js:11:33531)
      at afterScheduled (/$bunfs/root/chunk-0t4e2mg7.js:11:33418)

^C
✘-INT ~
23:34 $ opencode --version
1.15.11

Operating System

MacOS Tahoe 26.4.1

Terminal

iTerm2

Activity

  1. pwillis-oi commented on Jun 10, 2026

    @pwillis-oi
    Author

    I would update to latest, but there are so many known unfixed bugs in more recent versions that I don't want opencode to stop working. I really need to switch over to Pi...

  2. github-actions commented on Aug 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions