# Agent Huddle A small corner window with a card for every running Claude Code session: **working**, **needs you**, or **done**. When a session asks for permission, its card turns lime and you can click **Allow** or **Deny** without going back to the terminal. No dependencies. Node 18 or later. ## Install You need: - Node.js 18 or later (`node --version`) - Claude Code - `curl` (the `SessionStart` hook uses it; macOS and most Linux systems have it) There is nothing else to install. Either run it straight from GitHub with `npx` (below), or clone it: ```sh git clone https://github.com/suren19113/agent-huddle.git cd agent-huddle ``` Setup is three steps, in this order: 1. Start the huddle (next section). 2. Paste the hooks block into `~/.claude/settings.json` (once). 3. Start or restart your Claude Code sessions. Each one gets a card. ## Run it (one command) ```sh npx github:suren19113/agent-huddle ``` or, from a clone: ```sh npm start ``` It starts a local server on `http://localhost:4777` and opens the window in the top-right corner of your screen (Chrome, Edge or Brave app mode if you have one, your default browser otherwise). `--no-open` skips the window, `--port` changes the port. ## Point Claude Code at it (once) Print the hooks block: ```sh npx github:suren19113/agent-huddle hooks ``` and merge it into the `"hooks"` key of `~/.claude/settings.json`, so every project reports to the same huddle (or into one project's `.claude/settings.json` to try it on one repo first): ```json { "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "curl -s -m 2 -H 'content-type: application/json' --data-binary @- http://localhost:4777/hook >/dev/null 2>&1 || true", "timeout": 5 } ] } ], "UserPromptSubmit": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "PreToolUse": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "PostToolUse": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "PostToolUseFailure": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "PermissionRequest": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 600 } ] } ], "Notification": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "Stop": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ], "SessionEnd": [ { "hooks": [ { "type": "http", "url": "http://localhost:4777/hook", "timeout": 5 } ] } ] } } ``` Every event Claude Code sends carries `session_id` and `cwd`; that is how each session gets its own card. HTTP hooks POST the event JSON to the huddle. `SessionStart` only accepts command hooks, so that one pipes the same JSON in with `curl`. ## How approvals work The `PermissionRequest` hook is an HTTP call the huddle holds open until you click. Allow returns ```json { "hookSpecificOutput": { "hookEventName": "PermissionRequest", "decision": { "behavior": "allow" } } } ``` and Deny returns `"behavior": "deny"` with a `message` that Claude reads. What to expect, measured with Claude Code 2.1.322: - **Background (`claude --bg`) and headless (`claude -p`) sessions** show no prompt of their own. The session waits on the huddle; your click lets it carry on, with no `claude attach`. - **Interactive terminal sessions** still draw their own permission dialog at the same moment. Whichever answers first wins: click in the huddle and the dialog goes away; answer in the terminal and the card clears. - If the huddle is not running, the hooks fail quietly and Claude Code asks in the terminal as usual. The huddle gives up on a held request after about ten minutes and hands it back to the terminal. - A hook's `allow` never overrides a `deny` rule in your settings. - In auto mode most tool calls never reach a permission prompt, so you will see fewer cards turn lime. ## Safety The server listens on `127.0.0.1` only, rejects requests addressed to any other host name, and only takes a decision from the page it served (a per-run token), so a web page you visit cannot click Allow for you. ## Develop ```sh npm test ``` MIT licensed.