Which Session Is Waiting for Me? Claude Code Hooks on a Stream Deck
Описание и применение
Многосессионный поток работы с Claude Code затрудняет отслеживание статусов и запросов разрешений. Используя Stream Deck Neo, автор отображает состояние каждой сессии цветными кнопками и пиксельным иконкой, позволяя быстро переключаться и подтверждать запросы, тем самым экономя время.
Задача
Multiple Claude Code sessions run simultaneously, making it hard to notice when a session asks for permission or finishes, leading to wasted time switching windows.
Результат
The Stream Deck display reduces the time spent hunting for session windows and ensures the user notices permission requests and completion states promptly.
Рабочий процесс
- 1. Install Claude Code hooks that emit events to a small JSON file per session.
- 2. Write a script that maps hook events to four states (running, ask, waiting, idle).
- 3. Store the JSON file (folder, session, state) without prompt or output data.
- 4. Create a Stream Deck plugin that reads the JSON files every second and colors the keys accordingly.
- 5. Press a key to bring the corresponding session window to the front and approve any permission prompt.
- 6. Handle edge cases: retry file rename on Windows to avoid EPERM errors, remove old records after /clear, map old‑ID to new‑ID.
Доказательства
I put the state of each session on a small button box on my desk (a Stream Deck Neo: 8 keys and a thin info bar).
The hook writes to a temp file and renames it over the real one. The plugin reads that file every second. On Windows, if the rename lands at the exact moment the plugin is reading, the rename can fail with EPERM.
Pressing a key brings that session's window to the front. See red, press it, approve in that window. No more hunting.
- Дата записи: 2026-10-24T04:26:13.298Z