New
Apps 6,419Makers 6,403This week 7
Promote your app−30%
Perch screenshot 1 1 / 2
1views in
the last 30 days

perch bird

perch

claude sessions manager — for windows

a smol always-on-top bird that watches your claude code sessions
so you don't have to alt-tab through 10 terminal tabs like a maniac

a session finishes: double chirp, party hat, confetti

a session finishes → double chirp, party hat, confetti. that's the whole pitch.

perch watching sessions: needs-you, working, done, and the one-click compact button


why

i run a LOT of claude code sessions at once. multiple windows terminal windows, tabs everywhere. at some point i genuinely could not tell which session was done, which one was stuck waiting for me to click "allow", and which one was still cooking.

so i made perch. it's a tiny card that sits in the corner of your screen and just... tells you:

  • 🔴 needs you — waiting for permission or input (pulses + resurfaces + a single chirp so you actually notice)
  • 🟠 working — still cooking (background tasks included — perch sees those even though hooks can't)
  • 🟢 done — finished and readable: perch waits for the terminal to stop typing before it says so, then double-chirps
  • 🔵 quiet — a live agent perch found on its own, no events from it yet

and the best part: click a row and it jumps to the EXACT windows terminal tab. not "roughly the right window" — the exact tab, deterministically. (this took an embarrassing amount of effort, see war stories below.)

stuff it does

  • live status for every claude code session, via hooks
  • click-to-focus down to the exact tab
  • the tab strip itself tells you: every session's windows terminal tab wears a native ring badge painted by the hook — spinning arc = working (a little arc actually orbiting the icon slot, motion means cooking), full ring = finished, half arc = needs you. the taskbar icon plays along too — green/red verdicts, indeterminate pulse while working — so the whole fleet is readable with the terminal minimized and perch closed. esc-interrupting a turn fires no hook at all, so perch itself watches for spinners that outlive their session's verified state and wipes them (only ever the spinner — verdict rings are hook-earned). (yes, we once declared this impossible — see war stories for the recantation.) kill switch: an empty badge.off file in %LOCALAPPDATA%\AgentFocus
  • right-click a row → pin to top, rename, hide (remembered per project folder)
  • rename the TAB and the row follows: rows adopt your windows terminal tab names — rename a tab and the row wears it within seconds (the tab strip is the namespace you actually curate, so it outranks older perch-side renames). arbitrarily-renamed tabs are anonymous to every title matcher, so an ambient learner fingerprints whichever tab you're looking at against the anonymous sessions' known screens — perch learns your tabs just from you working in them, no clicks, no tab flipping. adopted names are written into the per-folder prefs, so they survive reboots instead of resetting to whatever the rows were called before the rename
  • pin the widget = always on top. unpin = it stays out of your way and just flashes the taskbar when something needs you
  • also spots codex / gemini / opencode / aider sessions out of the box (add whatever names you want to the list)
  • dead sessions disappear on their own, headless subagents / agent-team workers are hidden
  • done means DONE — three independent truth lanes: hooks report events, but hooks alone lie in both directions (they fire when the model finishes while the terminal is still typing the answer, and they're structurally blind to background tasks that keep cooking after Stop). so perch cross-examines: (1) the hook trail, (2) claude code's own live self-report in ~/.claude/sessions/<pid>.json — busy/idle/asking, background tasks included, flips instantly on esc, and (3) the console's actual pixels — a "done" row holds at working until one probe shows the screen calm and the answer is readable. the finish chirp additionally demands that the hooks authored the idle, so a manual /compact or an esc-interrupt never fakes a celebration
  • statuses that can't get stuck: for sessions without the native self-report (codex, gemini, anything hookless) perch notices a suspiciously stale busy row, quietly reads the console's actual screen, and corrects the label — a permission prompt hiding under "working" gets promoted to needs you, and a session stuck in Unable to connect to API … retrying shows as api retry (and flips back to working on its own the moment a retry gets through)
  • one-click /compact: past a context threshold you set (default 120k tokens, 0 = off) a purple compact chip appears on the row. click it and perch attaches to that session's console by PID and types /compact + Enter straight into its input buffer — no focus steal, no tab switch, works even minimized, wrong-window impossible. never automatic — you click, or nothing happens
  • prompt peek: hover any row → a little tooltip with the last thing you asked and the last thing claude answered, without touching the tab. read lazily from the transcript tail, cached, costs nothing until you linger
  • parked: a needs-you you've ignored for 30+ minutes (configurable) clearly wasn't that urgent — it demotes itself below "done", goes muted, stops pulsing. a fresh notification instantly brings the red back. fresh reds keep meaning fresh
  • crash insurance: perch keeps a rolling snapshot of every live session (id + folder), and sessions that die stay listed for 10 more minutes — because a windows shutdown kills your terminals before it kills perch, and without that grace the snapshot shrinks to a splinter of the fleet right as it matters most. power cut, BSOD, accidental shutdown? on the next boot a quiet banner offers "↻ 7 lost sessions — resume all" — one click relaunches each one via claude --resume, staggered so they don't stampede, and the roll call waits for the first terminal window to actually exist so the whole fleet lands as tabs in one window instead of scattering. nothing is ever relaunched automatically — you click, or you dismiss and it's forgotten
  • compact mode: double-click the header (or hit the – button) and perch folds into a tiny dynamic-island pill — the bird wearing your 5h limit as a colored ring, next to colored need-you / working / done counts (zzz when everything sleeps). click-driven, hover opens nothing: one click = the full card (the tooltip carries a passive counts + 5h% glance) — though passing the cursor over the bird himself makes him wave hello (wink + tiny bounce), and if he's asleep he cracks one eye open, clocks you, and drifts back off. push your luck — boop him four times in a row, or shake him mid-drag — and he straight-up swears at you (@#$%&! grawlix bubble, steam puff, shaking fist). drag it and you carry only the bird — capsule, ring and counts vanish and you're holding a scruff-grabbed birb with real dangle physics until you drop him and the pill reassembles
  • red = jump, everywhere: the pill's red count and the red "need you" chip are buttons — click one and you land straight in the terminal of the session that's been waiting longest, no expanding, no alt-tab roulette. same tab-matching engine as row clicks. everything still chirps, pulses and flashes — the pill just does it in ~150 pixels
  • the bird is alive: he's the center of the pill — a big bird whose limit-ring forms the capsule's left cap, everything else orbiting him. he has a full wardrobe of state faces (generated art in assets/bird/): he hatches from an egg on boot, blinks every few seconds, goes wide-eyed with alarm when a session newly needs you, wears reading glasses while sessions work, party-hats when work finishes, side-eyes over coffee when you ignore a needs-you, fans himself as your 5h limit cooks, gets scruff-grabbed like a kitten while you drag him, puts on aviator goggles when you jump to a terminal, and when everything's quiet: nightcap, blanket, drool bubble, breathing — drifting off through a half-lidded drowsy frame, both ways, like a real creature. the sprite tier makes states move: he actually flaps through the victory hop (two-frame wing alternation with confetti physics), sips his coffee every few seconds while side-eyeing your ignored sessions, and fans himself frantically in real time while your 5h limit cooks. motions ride on top — perk wiggle, happy double-hop, supervising head-tilts and pecks, grounding squash on park — and when he's awake with nothing to do, idle antics: he looks around, ruffles his feathers, or hops a half-turn and briefly sulks with his back to you. every motion is an event-driven render-only moment; the loops (sleep-breathing, the fan) only run when their state is actually on screen
  • themes: twelve rooms for your mascot to live in — the original midnight, oled, liquid glass, phosphor, nord, catppuccin, and synthwave, plus cyber (cyan circuitry), lagoon (deep-water aqua), ember (banked copper coals), haunted (moonlit violet), and matcha (moss with a honey glint). the mascot's halo re-tints to match whichever room you pick. status colors never change — those are semantics, not decoration. flip themes in ⚙ settings with live preview
  • live limit bars: how much of your 5-hour window and weekly caps you've burned and exactly when they reset, straight from the numbers Claude Code itself hands to its status line command. perch never asks Anthropic anything and never opens your login. green → amber → red as you cook, with burn-rate prediction (caps ~15:40) when you're on pace to hit the wall before the reset. and when no session is alive to report, a local estimate takes over: perch buckets your own transcripts into the same 5-hour billing windows (ccusage-style, anchored to the server's actual reset time) and calibrates tokens-per-window against official percentages it saw earlier — so the 5h ~local bar keeps working with zero network at all
  • actual bird chirps: three lovely mixkit chirps ship in sounds/ — a single chirp means a session needs you, a double chirp means work finished and the answer is ready to read. separate toggles + volume in ⚙ settings. drop your own .wavs in the folder to override; no wavs at all = a humble synth beep
  • one powershell script. no electron. no node_modules. your grandma's windows can run it

"isn't there already something like this?"

kind of, but not really — i looked:

  • claude-squad (8k★) and ccmanager (1k★) are great, but they're terminal multiplexers: you run your sessions inside them, tmux-style. that's a whole workflow change.
  • there's a small army of cute menubar companions (Pulse, notch dynamic-island apps, claude-code-menubar ×3...) — every single one is macOS.
  • windows had... a notification popup script. that's it.

perch is different on both axes: it's windows-native, and it watches the windows terminal tabs you already have — no tmux, no TUI to live inside, no workflow change. your sessions don't even know it exists.

install

you need: windows 10/11, windows terminal, and claude code (for the live statuses — other CLIs get presence + click-to-focus without any setup).

git clone https://github.com/anessbelbati/perch-claude-sessions-manager perch
cd perch
powershell -NoProfile -ExecutionPolicy Bypass -File install.ps1 -DesktopShortcut

the installer copies the hook to %LOCALAPPDATA%\AgentFocus\, compiles a tiny helper dll, and gently merges the hook into your ~/.claude/settings.json (it backs it up first and never touches your existing hooks). add -StartupShortcut if you want perch at login.

then double-click Perch.vbs. that's it. sessions you start after installing get full statuses; ones already running show up as soon as they do anything.

other CLI tools

any agent CLI running in a windows terminal tab shows up automatically if its process name is in AgentProcessNames (%LOCALAPPDATA%\AgentFocus\settings.json). that gives you presence + click-to-focus with zero setup.

for real statuses the tool needs to tell perch what it's doing — pipe one JSON line to agent-focus-status.ps1 -Provider <name>:

{"hook_event_name":"Stop","session_id":"<stable-id>","cwd":"<dir>","last_assistant_message":"..."}
event shows as
UserPromptSubmit / PreToolUse / PostToolUse working
Stop done
Notification needs you
StopFailure failed
SessionEnd gone

codex users: there's a ready-made adapter. in ~/.codex/config.toml:

notify = ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass",
          "-File", "<wherever-you-cloned-perch>\\codex-notify-adapter.ps1"]

how it works (nerd corner)

the hard problem is mapping a session to its exact tab. tab titles change constantly (spinner glyphs, task summaries) and guessing from the foreground window is a disaster if you tab-hop fast.

the trick: claude code hooks run as child processes of the claude process, so the hook can AttachConsole() into claude itself — and that console's title IS the session's tab title (ConPTY mirrors the app-set title up to windows terminal). match that against all tabs via UI Automation — but only when no other live session's console shows the same title right now (batch-restarted twins share identical startup titles, and matching a value without proving ownership once cross-wired two sessions). renamed tabs pin their name and ignore console titles entirely, so those fall back to cwd-name matching and, ultimately, to content fingerprinting: compare the console's visible screen text against what each tab actually renders. boom: session ↔ tab, no guessing.

a tab renamed to something arbitrary ("goat") defeats every title matcher, though — those sessions used to stay anonymous until a click forced the full fingerprint cycle. now an ambient learner closes the gap: every few seconds perch reads the pane text of whichever tab is selected (read-only — the one tab whose content is legible without switching anything) and scores it against the anonymous sessions' probed screens, demanding the same decisive score-plus-margin a click-cycle demands, with the tab's selection re-verified live before and after the read so a fast tab-hop can't pin a session to the wrong tab. you look at your tabs all day; perch turns that into identification. rows then wear the tab's name, and clicks jump exact.

clicking a row re-matches against live tabs (fresh title first, UIA runtime id as tiebreaker), restores the window if minimized, selects the tab, brings it forward.

the console link runs both ways: since the hook can attach, it can also write. after every status write it paints a ConEmu ESC]9;4 progress sequence straight into the session's CONOUT$ — windows terminal renders it as a native ring on the tab itself (spinning arc = working, full = finished, half arc = needs you) and drives the taskbar icon to match (green/red verdicts, indeterminate pulse while cooking). the spinner is WT's indeterminate state — we screenshotted it frame by frame to confirm the arc genuinely orbits, so working reads as motion instead of a fill amount you might misread as progress. claude never emits that sequence on its own, so nothing self-heals: every transition the hook paints is the only truth the tab will ever get, and session start/end explicitly clear so no ring outlives its session. paints dedup against the last recorded badge, so a cooking session costs zero extra console attaches — a full turn costs two (spinner on, verdict on), each a few milliseconds. the ring derives from the session's status, never from the event name — the status lane already knows things event names don't (a compact-end is mid-turn, not a finish), and the one time the badge mapping re-derived that for itself, it disagreed and blanked live tabs for minutes. two transitions have no hook at all: esc-interrupting a turn, and the tail of an auto-compact on a long turn. for both, perch runs a badge corrector in each direction — when the tab disagrees with the row's verified status (two consecutive sightings, 10s old), perch attaches and repaints the truth itself. only the spinner is ever second-guessed: perch will start or stop saying "cooking", but it never claims a session finished — verdict rings stay hook-earned, and the hook re-owns the tab the moment it speaks again (prompt-submit repaints unconditionally for exactly this handoff). and because the writer is attached to the session's console while it works, it must be mute: any stray output between attach and detach paints itself onto the session's screen (we know because it happened), so the whole dance is a single native call that returns a silent bool.

the other hard problem is knowing when a session is actually done. the Stop hook fires when the model finishes — but a fullscreen TUI keeps typewriter-rendering the answer for 5–15 more seconds (we measured it live), and background tasks can keep working for minutes after Stop with no hook ever firing again. so "done" is a verdict, not an event: the hook trail, claude's native per-pid self-report (~/.claude/sessions/<pid>.json), and a console-screen probe all have to agree. the hook write is detected in ~250ms via a cheeky NTFS trick (a directory's mtime bumps when a child file is created or renamed — one stat call, four times a second, zero file watching), the native file covers everything hooks can't see, and the screen probe holds the "done" until the answer is actually on screen. the chirp only sings when the hooks themselves wrote the idle — so nothing that isn't a finish can ever sound like one.

war stories

things that bit me so they don't have to bite you:

  • never capture from the foreground window. with fast tab-hopping the hook fires late and records whatever's focused. it once stored spotify as a session's location. clicking that row opened spotify.
  • never touch a suspended process's console. agent-team workers get suspended; their console server can't answer and GetConsoleTitle blocks forever. perch froze windowless at startup because of this.
  • DragMove() eats child clicks. the draggable header was swallowing every click on the pin button. mark the buttons' mouse-down as handled or they're decorative.
  • powershell + WPF share one thread. nested message pumps (menus!) stop each other's pipelines; a trap { break } then killed the whole app, and later an orphaned "refresh in progress" flag froze it silently. guard flags must be time-limited leases, not locks.
  • AttachConsole resets std handles. bind [Console]::Out before the first attach or your stdout just... stops.
  • taskbar icons lie. a powershell-hosted WPF window shows the powershell icon until you set your own AppUserModelID.
  • process-hunting by command-line substring matches your own diagnostic process. i killed my own kill-script mid-run more than once.
  • no hook fires on esc. claude code's Stop hook

Description taken from the repository README.

Ratings

–
0 ratings
5 0
4 0
3 0
2 0
1 0

Rate this app

Sign in to rate

Comments 0

Sign in to comment

No comments yet.

Related apps

#windows · #dev-tools · #ai-agents