DEV Community

Omer Saleem
Omer Saleem

Posted on Originally published at omerbinsaleem.com

One editor window quietly loaded every worktree I opened

Originally published at omerbinsaleem.com by Omer Bin Saleem (Omer Saleem).

Stacked "Initializing" notifications were not a slow start. The language server was running out of memory and restarting, once per popup.

How to do it

  1. Read the stacked popups as a symptom, not a status. A notification that never closes belongs to a process that died before it could close it, so count them: each one is a restart.
  2. Open the extension host output log for that server in your editor's log folder for the current window (mine was the Angular Language Service in Cursor, under output_logging_*), and grep for three strings: exited with signal, heap out of memory, and Enabling language service for. The first two confirm a crash loop. The third tells you what the server was holding when it died.
  3. Count the distinct projects in that third list. One server runs per editor window, and it keeps every project whose file was ever opened in that window. Mine held seventeen worktrees of our app at once, with ten crashes in the log.
  4. Check whether you can cap it before you try to. That extension has no memory or exclude setting, and the 4 GB heap is the editor runtime's own pointer compression limit, so no configuration fixes this. About six to eight copies of our app fill it.
  5. Reload the window. That clears the dead popups and starts one fresh server holding nothing.
  6. Change the habit instead of the setting: open a worktree in its own window rather than browsing its files from the main one. With several branches and sessions in flight, a worktree sitting on disk costs nothing. Opening one of its files in the main window is what loads it for the rest of the session.

Prompt to copy

My editor keeps stacking "Initializing" notifications from a language server extension in one window, and the old ones never close. Find the extension host output log for that server for the current window, then grep it for `exited with signal`, `heap out of memory`, and `Enabling language service for`. Tell me how many times it crashed, and list the distinct projects it had loaded with a count. Do not change any settings yet.
Enter fullscreen mode Exit fullscreen mode

I am Omer Bin Saleem, a frontend chapter lead who builds with AI every day. One practical AI hack a day at omerbinsaleem.com. LinkedIn: omer-bin-saleem ยท Instagram: @iomerbinsaleem.

Written with AI assistance, from my own work notes.

Top comments (0)