Repository navigation
feat(agents): add debug agent alerts and Terminal session navigation - #13
Merged
Merged
Conversation
Debug builds launched with TOKENBAR_AGENT_HOOKS=1 show Claude Code sessions waiting for an answer to a structured question (AskUserQuestion): an amber "Claude · N" in the menu bar and an Agents page in the popover. Answering, the next prompt, or the end of the session removes the entry; Esc sends no event, so Dismiss removes it. Claude Code command hooks post each payload with /usr/bin/curl to a listener bound to 127.0.0.1 and always exit 0, so Claude Code shows no error or delay while TokenBar is closed. Approvals are not counted: Claude Code sends no event when the user approves or denies. Go to Session brings the Terminal.app tab with the question to the front. The hook reports the Claude Code process and its TTY; TokenBar confirms both with the kernel and checks them again on click, so a closed tab whose TTY was reused never comes to the front. Other apps get Open <App>. The Apple Events entitlement is Debug only. Not yet: listener authentication, installing hooks from the app, Codex, and exact targets outside Terminal.app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying tokenbar with
|
| Latest commit: |
a14bdcc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4948a259.tokenbar-2vf.pages.dev |
| Branch Preview URL: | https://feat-agent-question-prototyp.tokenbar-2vf.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Debug-only prototype that shows when a Claude Code session is waiting for an answer to a structured question (
AskUserQuestion): an amber● Claude · Nin the menu bar, an Agents page in the popover, and Go to Session to bring the Terminal.app tab with the question to the front. Off unless launched withTOKENBAR_AGENT_HOOKS=1(listed, unchecked, in the shared scheme). Not part of Release builds.Why
To see at a glance whether an agent session is stopped waiting for you, without checking every terminal. This first version covers the signals that could be verified end to end with real sessions; approvals, Codex, hook installation, and listener authentication are left for later (see
docs/roadmap.md).How it was tested
scripts/lint.sh,scripts/test.sh(209 tests), Debug build without warnings.commandhooks with/usr/bin/curlon loopback. With TokenBar closed, Claude Code shows no errors and no noticeable delay (httphooks printedECONNREFUSEDon every event, so they were rejected).● Claude · 3→ session closed →2→ answered →1→ answered → back to usage.How to try it: docs/testing-agent-alerts.md. Design and limits: docs/agents.md.
Checklist
scripts/lint.shandscripts/test.shpass locally🤖 Generated with Claude Code