Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

BrainBar GUI orphans + socket litter: manual 'open' during deploy leaves a second menubar app running indefinitely

Open
#728 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
macos, python

Research direction

Trace the 1.5.8 deploy path and its launchd/Terminal.app handoff first, then inspect BrainBar startup, test socket handling, the hybrid helper, and the Wave 4.5 self-verifier. Done means deployment cannot leave an unmanaged or duplicate GUI, tests and helpers clean up stale sockets, and verification confirms exactly one GUI instance and one daemon holding /tmp/brainbar.sock.

Written by the indexing model from the issue text.

Description

Observed live 2026-08-19 by Etan ("there are now two brainbars at the same time").

Root cause: the 1.5.8 deploy runbook works around the agent-spawn _dyld_start hang by launching BrainBar via Terminal.app open. That instance is NOT launchd-managed (registers as application.com.brainlayer.brainbar.<n>) and nothing ever reaps it — PID 13335 ran from Aug 17 19:47 until manually killed Aug 19 21:5x, alongside the launchd-managed app (com.brainlayer.brainbar). Two menubar icons, two app processes, indefinitely.

Also found: 168 stale /tmp/brainbar-test-*.sock files from test runs (Aug 17-19) and 8 orphaned brainbar-hybrid-<pid>.sock files whose owning PIDs were long dead. Cleaned manually this session.

Asks:

  1. Deploy path should not leave an unmanaged GUI instance — either fix the agent-spawn hang so launchd can own it, or have the runbook hand the process to launchd (and refuse to start a second instance if one is already registered).
  2. BrainBar should single-instance itself: on launch, if another BrainBar is already running, either exit or take over — never silently run two menubar apps against the same DB.
  3. Tests must clean up their sockets (tmpdir fixture or atexit); the hybrid helper should unlink its socket on exit and sweep brainbar-hybrid-*.sock whose PID is dead at startup.
  4. Wave 4.5's self-verifier should assert exactly one GUI instance + one daemon holding /tmp/brainbar.sock — this is the same existence-vs-liveness class as #714.

🤖 Generated with Claude Code

Dominant language
Python
Stars
9
Forks
7
Avg merge
4h 50m
Merged PRs (30d)
404

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EtanHey/brainlayer

All issues in EtanHey/brainlayer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.