# Cursor crashes repeatedly on Ubuntu 24.04.4 during Agent usage (Window terminated unexpectedly, code 5)

**URL:** <https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303>\
**Category:** Bug Reports\
**Tags:** crashes, linux\
**Created:** [June 3, 2026, 8:17am UTC](https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303 "2026-06-03T08:17:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarioE](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MarioE](https://forum.cursor.com/u/MarioE)\
**Post date:** [June 3, 2026, 8:17am UTC](https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303/1 "2026-06-03T08:17:34Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

After updating Cursor a few days ago, Cursor has started crashing repeatedly on Ubuntu 24.04.4 LTS.

The crash occurs approximately every few minutes, most commonly while an Agent task is running. When the crash happens, Cursor displays:

The window terminated unexpectedly (reason: ‘crashed’, code: ‘5’)

The issue began immediately after updating Cursor. Prior to the update, Cursor was stable on the same machine.

### Steps to Reproduce

Open Cursor.  
Open a project/workspace.  
Start an Agent task (Auto model).  
Continue working or allow the Agent to run.

After a few minutes, Cursor crashes with:

The window terminated unexpectedly (reason: ‘crashed’, code: ‘5’)

### Expected Behavior

Cursor should remain stable while running Agent tasks and normal editing workflows.

### Operating System

Linux

### Version Information

Cursor Version:

3.6.31

Commit:

81fcf2931d7687b4ff3f3017858d0c6dee7e2a60

Architecture:

x64

Hardware:

GPU: Intel Iris Xe Graphics (Alder Lake-UP3 GT2)  
RAM: 31 GiB

### For AI issues: which model did you use?

AUTO

### Additional Information

Relevant log excerpts:

The window terminated unexpectedly (reason: ‘crashed’, code: ‘5’)  
Error sending from webFrameMain:  
Error: Render frame was disposed before WebFrameMain could be accessed  
[PowerMainService] Started wakelock id=1 owner=window:2 reason=“agent-loop”  
MaxListenersExceededWarning:  
Possible EventEmitter memory leak detected.  
11 child-process-gone listeners added to [EventEmitter]

System memory is not exhausted when the crash occurs:

31 GiB RAM total  
~20 GiB free  
Swap unused

The issue started immediately after a recent Cursor update and has been reproducible multiple times per day.

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![MarioE](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MarioE](https://forum.cursor.com/u/MarioE)\
**Post date:** [June 3, 2026, 9:12am UTC](https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303/5 "2026-06-03T09:12:59Z")

</div>

I have installed - `sudo dpkg -i cursor_3.4.20_amd64.deb`

On this version the crashes are not happening

---

<div class="post-metadata">

**Author:** ![kevinn](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/kevinn/32/101206_2.png) [@kevinn](https://forum.cursor.com/u/kevinn)\
**Post date:** [June 18, 2026, 12:48am UTC](https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303/8 "2026-06-18T00:48:34Z")

</div>

Hi @MarioE I took a look at your account and it looks like things have settled and you’re able to work ok on the latest version of Cursor? Let me know if this is not the case and I can have another look.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [August 9, 2026, 6:41pm UTC](https://forum.cursor.com/t/cursor-crashes-repeatedly-on-ubuntu-24-04-4-during-agent-usage-window-terminated-unexpectedly-code-5/162303/10 "2026-08-09T18:41:12Z")

</div>

Closed on August 9, 2026, 6:41pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
