A lightweight macOS menu bar app that shows your active GitHub Copilot CLI sessions at a glance. Click any session to jump straight to its terminal tab.
- π₯οΈ Live session list β see all active Copilot CLI sessions in your menu bar
- π±οΈ One-click tab switching β click a session to focus its terminal tab
- π Auto-refresh β updates every 30 seconds automatically
- π Directory context β shows the working directory for each session
- πͺΆ Lightweight β single binary, no dock icon, reads local files only (no network)
Copilot CLI stores session metadata locally. This app reads two sources:
~/.copilot/session-store.dbβ SQLite database with session names, directories, and timestamps~/.copilot/session-state/*/inuse.*.lockβ lock files that indicate which sessions have a live process
The app cross-references lock file PIDs with running processes to determine which sessions are active, then displays them in a native macOS menu bar dropdown.
graph LR
A["~/.copilot/session-store.db"] -->|SQLite read-only| B["Session Reader"]
C["~/.copilot/session-state/*/inuse.*.lock"] -->|Glob + PID check| B
B -->|Active sessions| D["Menu Builder"]
D -->|systray API| E["macOS Menu Bar"]
E -->|Click session| F["AppleScript"]
F -->|Switch tab| G["Terminal.app / Ghostty"]
H["30s Timer"] -->|Refresh| B
style A fill:#2d333b,color:#e6edf3,stroke:#444
style C fill:#2d333b,color:#e6edf3,stroke:#444
style E fill:#1a7f37,color:#fff,stroke:#444
style G fill:#2d333b,color:#e6edf3,stroke:#444
Note: This app is read-only β it never modifies any Copilot files.
- macOS 26 (Tahoe) or later
- Go 1.25+ (for building from source)
- GitHub Copilot CLI 1.0.12 or later installed and used at least once (so
~/.copilot/exists)
git clone https://github.com/liamchampton/copilot-cli-session-monitor.git
cd copilot-cli-session-monitor
make bundle
open 'Copilot CLI Session Monitor.app'Build the .app bundle and copy it to /Applications:
make installThen launch from Spotlight or Finder: search for "Copilot CLI Session Monitor".
Build and run the binary directly (useful for development):
make runCompile the binary without creating an .app bundle:
make build
./copilot-monitorNote: Running the bare binary works, but macOS requires a
.appbundle for the menu bar icon to render reliably. Usemake bundleormake installfor the best experience.
Once running, you'll see a small terminal icon in your macOS menu bar:
- Solid β at least one Copilot session is active
- Faded β no active sessions
Click the icon to see:
β Plan Terminal Session Sidebar
~/Documents/github/agent-controller
β Azure VS Code Changelog Calendar
~/Documents/github/everything-vs-code-shipped
β product-store-demo
~/Documents/github/product-store-demo
ββββββββββββββββββββββββββ
3 active Β· 13:25
ββββββββββββββββββββββββββ
Quit
Click any session name to switch to its terminal tab.
Session detection works with any terminal β it reads from Copilot CLI's local files, not the terminal itself. Tab switching currently supports macOS default terminal and Ghostty.
| Terminal | Session list | Active/idle status | Click to switch tab |
|---|---|---|---|
| macOS default terminal | β | β | β |
| Ghostty | β | β | β |
| iTerm2 | β | β | β Not yet |
| Warp | β | β | β Not yet |
| Kitty | β | β | β Not yet |
| Alacritty | β | β | β Not yet |
| tmux | β | β | β Not yet |
| VS Code terminal | β | β | β Not yet |
Want support for your terminal? Contributions welcome β see CONTRIBUTING.md.
On first launch, macOS will ask for Automation permission to control Terminal.app (or Ghostty, if detected). This is required for the tab-switching feature. Grant it in:
System Settings β Privacy & Security β Automation β Copilot CLI Session Monitor β Terminal / Ghostty
make uninstallOr manually delete:
rm -rf '/Applications/Copilot CLI Session Monitor.app'The app itself stores no data. To fully clean up:
# Remove the app
rm -rf '/Applications/Copilot CLI Session Monitor.app'
# Remove build artifacts (if in the project directory)
make cleanNote: This does not touch your
~/.copilot/directory β that belongs to GitHub Copilot CLI.
copilot-cli-session-monitor/
βββ main.go # Entry point β systray.Run()
βββ internal/
β βββ menu/
β β βββ builder.go # Systray menu construction
β β βββ builder_test.go # Unit tests for menu builder
β βββ monitor/
β β βββ monitor.go # Refresh timer orchestration
β βββ session/
β β βββ types.go # CopilotSession struct
β β βββ reader.go # SQLite + lock file reader
β β βββ reader_test.go # Unit tests for session reader
β βββ terminal/
β βββ focus.go # Terminal tab switching (Terminal.app + Ghostty)
βββ assets/
β βββ AppIcon.icns # macOS app icon (icns format)
β βββ app-icon.png # App icon source (png)
β βββ icon-active.png # Green menu bar icon
β βββ icon-idle.png # Gray menu bar icon
βββ bundle/
β βββ Info.plist # macOS app bundle metadata
βββ .github/
β βββ agents/
β βββ go-testing-agent.agent.md # Copilot agent for Go tests
βββ Makefile # Build, bundle, install targets
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # Project license
βββ go.mod
βββ go.sum
| Target | Description |
|---|---|
make build |
Compile the Go binary |
make bundle |
Build + package as Copilot CLI Session Monitor.app |
make install |
Build + bundle + copy to /Applications |
make uninstall |
Remove from /Applications |
make run |
Build and run directly (for development) |
make clean |
Remove build artifacts |
- Read-only β never writes to Copilot's files
- Pure Go SQLite (
modernc.org/sqlite) β no CGo dependency for database access - Goroutine-safe β cancel pattern prevents leaked goroutines on menu refresh
- Persistent DB connection β opened once, reused across refreshes
- Efficient queries β scans lock files first, then queries only active session IDs
- Go β application language
- fyne.io/systray β cross-platform system tray
- modernc.org/sqlite β pure Go SQLite driver
- AppleScript β Terminal.app and Ghostty tab switching
Contributions are welcome! Please read CONTRIBUTING.md and open an issue first to discuss what you'd like to change.
