Skip to content

App hanging when alt-tabbing into Supacode, switching between worktrees or creating tabs #721

Description

@iannotian

What happened?

There seems to be a state that Supacode eventually gets itself into gradually over time, as I use the app.

When I:

  • alt-tab into Supacode
  • switch to another worktree
  • create a libghostty pane
  • create a tab

the app hangs for about a second (at least that's the worst I've seen) when switching worktrees or focusing. Creating tabs or creating libghostty panes cause macOS beach-balling and hang for about two seconds (worst case). This hang gets worse over time and is aggravating from a UX standpoint.

This occurs when I have the app open for a while. If I quit and reopen Supacode (don't close tabs and sessions via quit dialog), alt-tabbing and switching between tabs and worktrees becomes responsive again. I have not yet replicated this issue again as I just tried quitting and re-opening.

I have about 55 worktrees across several repositories. 32 of those worktrees are about 2 GB in size. I tried archiving and deleting worktrees and that did not fix the issue. Quitting and reopening Supacode did work.

Switching/focusing between already created libghostty panes was always responsive, and that functionality seems unaffected by hanging.

Memory usage by Supacode was 2 GB at worst. After restarting, it is down to 670 MB.

Steps to reproduce

  1. Have a lot of worktrees, do a lot of work.
  2. Alt-tab or focus into Supacode, or select another worktree, or create a libghostty pane, or create a tab.

Supacode version and build

0.10.6 (1783877721)

macOS version

macOS 26.5

System locale

en_US

Mac hardware

M1 Max

Relevant logs or screenshots

Are you planning to fix this yourself?

  • I intend to open a pull request once this is confirmed and marked ready.

Before submitting

  • I searched existing issues and this is not a duplicate.
  • I am on the latest available version of Supacode.
  • I understand pull requests are closed until the issue is marked ready.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions