[761] potential listener LEAK detected, having 1671 listeners already

Hi, composer stops responding after a while. Could someone please take a look? thanks.

[761] potential listener LEAK detected, having 1671 listeners already. MOST frequent listener (557):
check @ workbench.desktop.main.js:433
q @ workbench.desktop.main.js:436
d @ workbench.desktop.main.js:1197
o @ workbench.desktop.main.js:1136
createInstance @ workbench.desktop.main.js:1136
J @ workbench.desktop.main.js:1270
o @ workbench.desktop.main.js:1136
createInstance @ workbench.desktop.main.js:1136
I @ workbench.desktop.main.js:1283
createModel @ workbench.desktop.main.js:1284
H @ workbench.desktop.main.js:2456
G @ workbench.desktop.main.js:2456
Fb @ workbench.desktop.main.js:3114
Eb @ workbench.desktop.main.js:3114
Db @ workbench.desktop.main.js:3114
await in Db (async)
zb @ workbench.desktop.main.js:3114
workbench.desktop.main.js:433 Error
at f.create (workbench.desktop.main.js:433:58393)
at y.q [as onDidChange] (workbench.desktop.main.js:436:1100)
at new d (workbench.desktop.main.js:1197:8845)
at c.o (workbench.desktop.main.js:1136:1609)
at c.createInstance (workbench.desktop.main.js:1136:1101)
at new J (workbench.desktop.main.js:1270:7875)
at c.o (workbench.desktop.main.js:1136:1609)
at c.createInstance (workbench.desktop.main.js:1136:1101)
at b.I (workbench.desktop.main.js:1283:1976)
at b.createModel (workbench.desktop.main.js:1284:963)
at L (workbench.desktop.main.js:2567:25450)
at workbench.desktop.main.js:2983:6914
at Proxy.forEach ()
at workbench.desktop.main.js:2983:6812
at Array.forEach ()
at B.composerWasLoadedHook (workbench.desktop.main.js:2983:6798)
at $.pushComposer (workbench.desktop.main.js:2572:13639)
at $.getHandle (workbench.desktop.main.js:2572:14768)

Hey,

This may be an issue we are aware of already and are looking into.
Can you confirm, do this issue go away if you start a new Composer session?

No, I tried restarting multiple times but it didn’t go away.

When you say restarting, just to confirm, you mean restarting Cursor, or starting a new composer session with the + button?

I meant restarting the Cursor. But yes, when I start a new composer session - the new session works and I do not see the LEAKs message in the console.

Hey,

Do you still have an old composer session that does not respond?
If you do, keep it and let me know. We are struggling to reproduce this ourselves, so if you’ve got an example of this bug, we’d love to dig in further!

Yes I have the session. when I’m switching to it - it is causing the “LEAK” error visible in the console.

I am facing the same error here:

[1df] potential listener LEAK detected, having 354 listeners already. MOST frequent listener (91):
workbench.desktop.main.js:433 Error
at f.create (workbench.desktop.main.js:433:58393)
at C.q [as onDidChange] (workbench.desktop.main.js:436:1100)
at h (workbench.desktop.main.js:1133:156733)
at h.Kb (workbench.desktop.main.js:1285:13443)
at new X (workbench.desktop.main.js:1285:11538)
at new h (workbench.desktop.main.js:2099:35608)
at c.o (workbench.desktop.main.js:1136:1609)
at c.createInstance (workbench.desktop.main.js:1136:1101)
at L (workbench.desktop.main.js:2567:25229)
at Qe.registerNewCodeBlock (workbench.desktop.main.js:4099:2423)
at c.j (workbench.desktop.main.js:3996:1615)
at c.streamedCall (workbench.desktop.main.js:3994:20226)
at p.runStreamingTool (workbench.desktop.main.js:4005:1439)
at p.toolWrappedStream (workbench.desktop.main.js:4005:3446)
at async Ae (workbench.desktop.main.js:3773:20131)
at async workbench.desktop.main.js:3906:6145
at async H.handleStreamComposer (workbench.desktop.main.js:3906:2064)
at async Be.streamResponse (workbench.desktop.main.js:3774:9589)
at async f. (workbench.desktop.main.js:4467:1136)
at async Qe.processCodeBlocks (workbench.desktop.main.js:4089:4141)
at async Qe.submitChatMaybeAbortCurrent (workbench.desktop.main.js:4077:70395)
at async tt (workbench.desktop.main.js:4576:17310)
workbench.desktop.main.js:433 [1ba] potential listener LEAK detected, having 354 listeners already. MOST frequent listener (91):

Hi @prosunnysharma and @previ,

Would it be possible for either of you to hop on a call with one or two of our devs, and they can try to find the issue?
This is something we are really looking to fix, but we’ve been struggling to reproduce it internally.

Let me know if either of you would be up for this!

I will be available. 7:30pm IST works?

Hi, let me talk to our engineering team about their availability, and I’ll message you directly soon. It may be next week now, as the week is quickly coming to an end!

messaged you directly!

Same issue here, the leak messages continue endlessly for this one project that 100% stops chatting with me, but if I start a new project it works correctly. If I close cursor and then open recent the broken project, it remains broken.

Im getting the same issue here even on the latest update. happens frequently when the composer agent chat window becomes long. disabling extensions, restarting cursor, none of it works, only way to resolve is starting a new chat which is irritating when im trying to solve something which requires context

Hey, we should have a fix for this in our latest update!
If you haven’t been prompted to auto-update, you can download the latest version at Downloads | Cursor - The AI Code Editor

I am still seeing this issue the last couple days. Is there a way to recover without having to create a new composer session and losing context?


Version: 0.44.11
VSCode Version: 1.93.1
Commit: fe574d0820377383143b2ea26aa6ae28b3425220
Date: 2025-01-03T07:59:06.361Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin x64 24.2.0