[BUG] MaxListenersExceededWarning

Resolved 💬 93 comments Opened Jun 24, 2025 by JohnDotOwl Closed Aug 23, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

(node:2760906) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

This warning appears at random when using claude on terminal.

View original on GitHub ↗

93 Comments

poppabear8883 · 1 year ago

Same here. Happened with the most recent update.

(node:17379) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit        
(Use `node --trace-warnings ...` to show where the warning was created)
sbrkopac · 1 year ago

Getting the same error.

okhaimie-dev · 1 year ago

Same here

(node:76582) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
gbertb · 1 year ago

same

teito-dev · 1 year ago

getting the same error too : (node:93282) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

ashwin-ant collaborator · 1 year ago

Hey, we're looking into this. Can you share when this started? Was it with today's release (1.0.33) or before? Also, what version of node are you running (node -v)?

okhaimie-dev · 1 year ago
Hey, we're looking into this. Can you share when this started? Was it with today's release (1.0.33) or before? Also, what version of node are you running (node -v)?

Today, about 4-5hrs ago for me

yipingbenjaminl · 1 year ago

got this as well

ashwin-ant collaborator · 1 year ago

Does this happen at any time or just in plan mode?

yipingbenjaminl · 1 year ago

anytime, usually after about 30 minutes of usage, it starts happening

pmatos · 1 year ago
Hey, we're looking into this. Can you share when this started? Was it with today's release (1.0.33) or before? Also, what version of node are you running (node -v)?

node version is v20.18.1 here. It started with claude 1.0.33 afaiu.

JohnDotOwl · 1 year ago
Hey, we're looking into this. Can you share when this started? Was it with today's release (1.0.33) or before? Also, what version of node are you running (node -v)?

1.0.31
31 is ok i think, didnt see this problem yesterday. I started when update started streaming into my terminals i had like quite a few open

my node is v22.14.0

so it's probably 1.0.32 , i started my session at 7am (+8time zone)

pierre-warnier · 1 year ago

(node:2587029) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit

Got several today. None before today.

kevin-valerio · 1 year ago

Same here.

keethburu · 1 year ago

node v20.19.3 here; saw this first in claude 1.0.33

naseef · 1 year ago

Same here

paraddox · 1 year ago

(node:25217) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
~$ claude --version
1.0.33 (Claude Code)
~$ node --version
v18.19.1

same. started after today's update.

salamfall · 1 year ago

I started seeing this this morning
-Now let me check how this component gets its data by looking for the component class or service provider:
(node:839800) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

exileum · 1 year ago

Same problem after today's update.

norbinsh · 1 year ago

same here

erenkan · 1 year ago

same here

lukebellis · 1 year ago

Same

tcsenpai · 1 year ago

Same here. It might be either a bug in claude code or claude code should properly set the max listeners value

jacobomadsen · 1 year ago

Got this after a few minutes on latest update as well

aiqbalsyah · 1 year ago

same here too brothers

adstr123 · 1 year ago

Started with today's release

~ % claude --version
1.0.33 (Claude Code)
~ % node --version
v20.18.0
stavarc · 1 year ago

yes, also getting this.

So what's the deal, what is the effect of having this error?

JohnDotOwl · 1 year ago

@ashwin-ant , if claude code came with a context engine like augmentcode's , maybe this error could have been solved. Just joking 😂
Any planned context engine for claude code?

What's the rest of you using ?
https://github.com/oraios/serena ?

CooperBigFoot · 1 year ago

Same here

(node:39739) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit

iteration · 1 year ago

Same. Started yesterday. (node:30263) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

sgup · 1 year ago

same here
1.0.33 (Claude Code)
v20.9.0 (node)

mickaelxd · 1 year ago

❯ node -v
v20.19.3
❯ claude --version
1.0.33 (Claude Code)

silvercondor · 1 year ago

add me lol

adsa874 · 1 year ago

same here dawgs

ramphy · 1 year ago

same here

ramphy · 1 year ago
Same here. Happened with the most recent update. `` (node:17379) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit (Use node --trace-warnings ... to show where the warning was created) ``

I made a downgrade to:
sudo npm install -g @anthropic-ai/claude-code@1.0.31

NickMainAtPI · 1 year ago

Getting this consistently with the new update as well.

Poorab-Rejig · 1 year ago

Ditto

robwheatley · 1 year ago

Another "Me Too".

Claude 1.0.33 and node 20.19.0

I get it within a couple of mins of use (ie, I don't need to have created a large context to start getting it).

I've noticed it in all modes

ashwin-ant collaborator · 1 year ago

We've identified the root cause here and should have a fix up shortly.

Kedork · 1 year ago

I see there's a fix in progress, just chiming in that I started to see this error starting yesterday too.

(node:4361) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit

ashwin-ant collaborator · 1 year ago

This should be fixed in 1.0.34. Please update and let me know if it's still happening.

ChaseIngersol · 1 year ago

@ashwin-ant

Still happening in 1.0.34 for me.

ashwin-ant collaborator · 1 year ago

@ChaseIngersol can you run these commands and paste the output:

claude -v
node -v
ChaseIngersol · 1 year ago

@ashwin-ant

Absolutely. Thanks for your work on this awesome tool 👍

$ claude -v
1.0.34 (Claude Code)

$ node -v
v18.19.1
weisisheng · 1 year ago

Also on node v21.1.0

JohnDotOwl · 1 year ago

I believe it's resolved. If you face any issue please comment. Thank you!

ducnvu · 1 year ago

Still seeing this on 1.0.34

● Update Todos
⎿ ☐ Search for rate limiting related files in the codebase
☐ Analyze rate limiting implementation details
☐ Summarize how rate limiting works in this project
(node:575768) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

● Task(Search for rate limiting code)
⎿ Done (18 tool uses · 0 tokens · 2m 44.1s)

claude -v
1.0.34 (Claude Code)

node -v
v18.17.1

ashwin-ant collaborator · 1 year ago

Continuing to investigate here, thanks everyone for the reports 😄

@ducnvu @ChaseIngersol @weisisheng is it still happening as frequently? And is it happening early on in the session or after you've been in it for a while?

ducnvu · 1 year ago

@ashwin-ant I have seen both off the top of my head. Recently upgraded from 1.0.27 to 1.0.34 and immediately noticed this, pretty frequent albeit it doesn't stop my run, just an extra warning on the screen

ashwin-ant collaborator · 1 year ago

This appears to have been due to a bug in the upstream SDK, which is now resolved: https://github.com/anthropics/anthropic-sdk-typescript/commit/eb272af39becf87549859f7257ec272facf590b2.

We just rolled out 1.0.35 which incorporates this update. Please let me know if the issue arises on 1.0.35!

ChaseIngersol · 1 year ago

@ashwin-ant

Thanks for the update!

I haven't seen the issue so far on 1.0.35 after a full day of use, so we're looking good so far 👍

JohnDotOwl · 1 year ago

Closed. Thanks for the fix. I no longer see the error for the past 50m tokens.

chauhang · 1 year ago

@ashwin-ant I am still getting this error for 1.0.35 version: "(node:11555) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit"

claude -v
1.0.35 (Claude Code)
node -v
v20.19.2

tmchow · 1 year ago

@ashwin-ant I'm on 1.0.43 and still getting this issue:

MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
ashwin-ant collaborator · 1 year ago

@tmchow is it happening after a long chain of tool calls from a Task? Or just randomly?

JohnDotOwl · 1 year ago

Oh its back , saw it 2 minutes ago

Perfect! I found the issue. Now let me check the database to understand the actual source
mapping and see what xxx

(node:249303) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

Happened after /compact , long conversation before /compact

1.0.43 (Claude Code)

ras434 · 1 year ago

I've discovered that this issue can occur even with minimal EventEmitter usage, not just during long conversations. Here's a minimal reproduction case that triggers the warning:

// Minimal test case - triggers warning immediately
const { EventEmitter } = require('events');

// Simply creating event emitters can trigger the warning
for (let i = 0; i < 5; i++) {
    const emitter = new EventEmitter();
    
    // Add a few listeners
    for (let j = 0; j < 3; j++) {
        emitter.on('test', () => {});
    }
}

console.log('Simple EventEmitter usage can trigger Claude Code warnings');

This suggests the issue might be more fundamental than just long conversations or /compact commands. The warning appears to be triggered by Claude Code's internal event handling, even when user code has minimal EventEmitter usage.

Environment:

  • Claude Code v1.0.43
  • Node.js v22.10.0
  • macOS Darwin 24.5.0

The workaround of increasing defaultMaxListeners still works:

require('events').defaultMaxListeners = 50;
ashwin-ant collaborator · 1 year ago

@ras434 I'm not following how a separate script would cause this warning in Claude Code. That script would run as its own node process. That said, we're looking back into this. It seems like the previous fix reduced the issue significantly (just based on this issue's comment volume), but there's clearly still something going on here.

tmchow · 1 year ago
@tmchow is it happening after a long chain of tool calls from a Task? Or just randomly?

I've seen it both ways but mostly after long chain

ras434 · 1 year ago

@ashwin-ant I've found a reliable way to reproduce the MaxListenersExceededWarning - it occurs consistently when spawning multiple parallel Task agents.

Reproduction Steps:

  1. Start a fresh Claude Code session
  2. Ask Claude to spawn multiple parallel agents (5-8 agents trigger it reliably)
  3. The warning appears immediately as the agents start executing

Example prompt that triggers it:
"Can you start 8 parallel agents to perform different tasks like reading files, creating files, and running bash commands?"

Key Observations:

  • The warning appears immediately when multiple Task agents are spawned in parallel
  • It happens even with a fresh session (no long conversation history)
  • No /compact command needed
  • The warning shows a PID that doesn't match any user processes
  • This occurs with Claude Code v1.0.43 on macOS with Node.js v22.10.0

Theory:

Each Task agent appears to register multiple abort listeners internally. When spawning several agents in parallel, these listeners accumulate quickly and exceed the default limit of 10, triggering the warning.

This would explain why:

  • Long conversations trigger it (multiple tool calls over time)
  • /compact triggers it (likely uses internal agents)
  • Parallel agents trigger it immediately (multiple agents at once)

The common factor is multiple internal operations that each register abort listeners without proper cleanup.

ashwin-ant collaborator · 1 year ago

Fix coming in the next release.

christiangenco · 1 year ago

I just started getting this today on Claude Code 1.0.51:

(node:26131) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

claude spikes to 100% CPU and I see dozens and dozens of ruby processes. The claude process becomes unresponsive until I killall -9 claude.

<img width="3680" height="2382" alt="Image" src="https://github.com/user-attachments/assets/507392ff-78ea-4614-9ac4-9bd8c37421ff" />

I'm curious about the processes being ruby because I don't think claude code has any ruby in it—the project I'm working on is a Ruby on Rails web app.

christiangenco · 1 year ago

Oh, hah, found my problem: for some reason there were a million hooks for formatting my code in settings.local.json:

<img width="1976" height="2826" alt="Image" src="https://github.com/user-attachments/assets/b1247d0d-09dc-4960-a184-b1784b24cd00" />

I had tools defined in .claude/settings.json and it looks like they got copied over into settings.local.json multiple times?

ashwin-ant collaborator · 1 year ago

@christiangenco that sounds like it might be a separate bug with settings. Mind filing a new issue for that?

ashwin-ant collaborator · 1 year ago

I'm closing this issue since I haven't heard any new reports in the last week (fix went out in 1.0.44).

dgarson · 1 year ago

I just got this again today. I've been getting it for a while. I think it might have to do with subagents? Not sure. I have never seen it if I'm running all tasks in the "root" agent. I'm running on Mac OS and have auto-update enabled.

claude -v yields 1.0.52 (Claude Code)

  Let me spin up agents for these tasks:
(node:18570) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

@ashwin-ant Is it possible that abort listeners for subagents are not properly unregistered when the subagent is done? I don't see the subagents as distinct node / claude code processes, so this seems plausible.

mickaelxd · 1 year ago

Same here as @dgarson . Since the 1.0.44 release of Claude Code, I was no longer seeing this warning. However, with version 1.0.52, the issue has resurfaced.

mickael in www/freela/mep
❯ claude -v
1.0.52 (Claude Code)

JohnDotOwl · 1 year ago

I do see it , but it's pretty rare like a pokemon, let me try spot it today.

primeboard-dev · 1 year ago

Got this issue and it's not just the warning but a full on crash - details including log and version below under . This was running latest claude 1.0.53

This did happen during running claude --dangerously-skip-permissions. There are some hooks defined which have been throwing some warnings too, but have been totally fine that way until yesterday. And then - got this TWICE within an hour.

PostToolUse:mcp__taskmaster-ai__set_task_status [bash] failed with non-blocking status code 127: bash: line 1: 
session_id:e939b72d-b137-4e09-920d-b6424fcdfcee: command not found

This fully halted the process so

(node:55688) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
TypeError: Cannot read properties of undefined (reading 'message')
    at file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2341:798
    at Array.filter (<anonymous>)
    at Object.renderToolUseProgressMessage (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2341:763)
    at Object.renderToolUseErrorMessage (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2341:2511)
    at Ae2 (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2264:886)
    at QN (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19799)
    at dS (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42569)
    at uS (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38118)
    at nL (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38046)
    at qN (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:37900)

  ERROR  Cannot read properties of undefined (reading 'message')

 file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2341:798

 -  (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2341:798)
 -     at Array.filter (<anonymous>)
 -Object.renderToolUseProgressMes (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cl
  age                            i.js:2341:763)
 -Object.renderToolUseErrorMess (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.
  ge                           js:2341:2511)
 - Ae2 (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2264:886)
 - QN (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19799)
 - dS (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42569)
 - uS (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38118)
 - nL (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38046)
 - qN (file:///Users/u/.nvm/versions/node/v20.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:37900)


(base) ➜  project-directory git:(main) ✗ npm ls -g @anthropic-ai/claude-code
/Users/u/.nvm/versions/node/v20.17.0/lib
└── @anthropic-ai/claude-code@1.0.53
josh1e · 1 year ago

got this today after the auto update (no changelog) to 1.0.53 : Now let me have the working group collaborate on the solution:
(node:481) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

dgarson · 1 year ago

Definitely need more people to observe if there's a correlation, since it's far from a large sample size, but the last 5 of 5 times I saw it, it was immediately before a subagent "Task N: ...." appeared in my console.

poppabear8883 · 12 months ago

(node:22362) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

Happens when launching sub-agents in parallel for me, latest version of CC

azure-architect · 12 months ago

no correlation with sub tasks just started happening out of the blue. I am getting this in vscode btw, I didn't see anyone call out the platform yet. if i shutdown vscode completely and come back to cc it seems to resolve it. I am using the cc extension.

JohnDotOwl · 12 months ago

Just saw this appear after it started reading multiple files
(node:2409896) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

1.0.55 (Claude Code)

lucacri · 12 months ago

Same here for me, happening constantly

MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

outdooricon · 11 months ago

@ashwin-ant I think we may need to reopen this. I'm seeing this often as well now

Sing303 · 11 months ago

This is a recurring issue that I encounter regularly. Windows, version v1.0.57

ashwin-ant collaborator · 11 months ago

Are people still seeing this in 1.0.58?

ras434 · 11 months ago

I haven't seen it recently.

On Tue, Jul 22, 2025 at 10:24 PM Ashwin Bhat @.***>
wrote:

ashwin-ant left a comment (anthropics/claude-code#2506) <https://github.com/anthropics/claude-code/issues/2506#issuecomment-3105444843> Are people still seeing this in 1.0.58? — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/2506#issuecomment-3105444843>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFY3SSOAK6RSCCKXGE2Y3D33J3W45AVCNFSM6AAAAAB764ZDOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMBVGQ2DIOBUGM> . You are receiving this because you were mentioned.Message ID: @.***>

--
Rob Schmidt

JayRichh · 11 months ago
Are people still seeing this in 1.0.58?

sure are , confirmed version

(node:26248) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit

outdooricon · 11 months ago

Yes, 1.0.58

drobbins-ancile · 11 months ago
Are people still seeing this in 1.0.58?

Yes. Multiple time so far today.

Claude Code version 1.0.58
Node version 24.4.1
OS: MacOS 15.5 (24F74)

While running inside VSCode Dev Container.

lucacri · 11 months ago

Just got one again:

       "data": {
         "message": "Successfully updated task 10.1 status to \"done\"",
     … +161 lines (ctrl+r to expand)
(node:406) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

version 1.0.60

MartinKavik · 11 months ago

While debugging a CSS issue (width: 100% not applying correctly), Claude quickly hits this warning:

● I can see the issue persists - the backgrounds still don't extend to the full scrollable content width. Let me
  create a specialized subagent to analyze this specific scrollable background problem:
(node:289797) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

● Task(Debug scrollable background extension)
  ⎿  Done (1 tool use · 0 tokens · 15m 55.0s)
  ⎿  Claude usage limit reached. Your limit will reset at 5pm (Europe/Prague).

It seems that subagents add abort listeners without cleanup, leading to listener bloat. After a few minutes, usage limits (Max 5x) are hit and the task fails.

Extra info: It was using Browser MCP while debugging, Claude Code 1.0.63, Linux

shawnlopresto · 11 months ago

I ran into this same issue on Claude Code 1.0.63, OS X, and got the same error today, and hit my Max 20x usage limit (for the first time ever) shortly after.

MaxListenersExceededWarning:` Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

Why was today different?

I enabled subagents yesterday and was able to run agent chains without issues over the entire day. It was today that I set up hooks to more consistently use parallel sub-agents that I was seeing with my CLAUDE.md alone. It was working great until it wasn't.

I was not doing anything heavier today than I have been over the past month+, so if this issue contributed to hitting my limit in <5 hours of use today...then looking forward to a fix. (till then, reverting my config to last known good)

marcelo-gondim · 11 months ago

same issue

(node:58107) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit

Claude Code v1.0.71
L Session ID: 89f495f2-b507-4e47-9840-e6d836b3d36d

dhollman contributor · 10 months ago

We've put in a bunch of different fixes on this issue over the past month, and I put in one more today. I'm going to go ahead and close this issue so that we can get some signal on whether we still have this issue—please reopen if you're still seeing this!

mrwilby · 10 months ago

Still seeing this:

I'll use agents to migrate the existing plugins to the new framework in parallel:
(node:87275) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

❯ claude --version
1.0.89 (Claude Code)

outdooricon · 10 months ago

I still see this as well, not quite as often but it still shows up in 1.0.89

dstreefkerk · 10 months ago

+1, still seeing this, using around 5 subagents and 2 MCPs to run through a workflow. 1.0.96

(node:2092) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit
kierr · 10 months ago
+1, still seeing this, using around 5 subagents and 2 MCPs to run through a workflow. 1.0.96 > (node:2092) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 51 abort listeners added to [AbortSignal]. MaxListeners is 50. Use events.setMaxListeners() to increase limit

Same here, 10.0.96, node 24, with 10 subagents and no MCPs.

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.