ai newsMi., 25. Nov.
EilmeldungYale’s Sonnenfeld: Nvidia is a ‘detriment’ to U.S. industrial might — not a champion

HUDDLE: Eckfenster zeigt, wann ein Claude Code Agent auf eine Antwort wartet

Das Tool Huddle blendet ein kleines Fenster ein, das meldet, sobald ein Claude Code Agent eine Frage stellt oder eine Freigabe braucht. Wer nebenbei in Meetings ist, verpasst so nicht mehr, dass der Agent auf eine Eingabe wartet, und muss nicht alle Tabs durchklicken.

dev.toDienstag 06:30 · 24.11.DE3 Min. Lesezeit
Bild: dev.to

Veröffentlicht am 24. Nov • Ursprünglich veröffentlicht auf surn.app

Du bittest Claude Code, einen Bug zu beheben, und gehst in ein Meeting. Du kommst zurück, und nichts ist erledigt. Es hat dir eine Frage gestellt, "darf ich das ausführen?", und saß dann da und hat auf dich gewartet.

Sich durch jeden Tab zu klicken, ist der langsame Weg, das zu bemerken. Deshalb habe ich einen schnelleren gebaut: das Huddle, ein kleines Fenster in der Ecke meines Bildschirms mit einer Karte für jede Claude-Code-Session. Der Code ist frei und Open Source: github.com/suren19113/agent-huddle (MIT).

Diese Seite führt Schritt für Schritt durch die Einrichtung.

Claude Code hat eine eigene Agent-Ansicht, claude agents. Sie hat zwei Lücken:

Ich wollte alle Sessions an einem Ort und Genehmigungen mit einem Klick.

Jede Claude-Code-Session bekommt eine Karte, und jede Karte zeigt, was sie gerade tut:

Wenn eine Session um eine Berechtigung bittet, klickst du auf ihrer Karte auf Allow oder Deny, und die Antwort geht direkt an Claude zurück.

Claude Code feuert bei jedem Schritt einer Session einen Hook ab: beim Start (SessionStart), bevor ein Tool verwendet wird (PreToolUse), wenn eine Berechtigungsentscheidung nötig ist (PermissionRequest), beim Beenden (Stop) und einige weitere. Jedes Event enthält die session_id und das cwd der Session, und so bekommt jede Session ihre eigene Karte.

Ich habe alle auf das Huddle gerichtet. Ein HTTP-Hook sendet das Event als JSON per POST an einen lokalen Server; das Fenster liest von diesem Server.

Es müssen keine Dependencies installiert werden. Du kannst es direkt von GitHub mit npx ausführen oder es klonen:

git clone https://github.com/suren19113/agent-huddle.git cd agent-huddle Vollbildmodus aufrufen Vollbildmodus verlassen Schritt 2: das Huddle starten npx github:suren19113/agent-huddle Vollbildmodus aufrufen Vollbildmodus verlassen oder aus dem Klon:

npm start Vollbildmodus aufrufen Vollbildmodus verlassen Es startet einen lokalen Server auf http://localhost:4777 und öffnet das Fenster in der oberen rechten Ecke deines Bildschirms (Chrome, Edge oder Brave im App-Modus, falls vorhanden, sonst dein Standardbrowser). --port ändert den Port und --no-open überspringt das Fenster.

npx github:suren19113/agent-huddle hooks Vollbildmodus aufrufen Vollbildmodus verlassen Füge es in den "hooks"-Schlüssel von ~/.claude/settings.json ein, der Settings-Datei in deinem Home-Ordner. Diese Datei gilt für jedes Projekt, sodass jede Session auf deinem Computer an dasselbe Huddle berichtet. (Um es zuerst nur in einem Repo auszuprobieren, lege es stattdessen in die.claude/settings.json dieses Projekts.)

{ "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 } ] } ] } } Vollbildmodus aufrufen Vollbildmodus verlassen SessionStart akzeptiert nur Command-Hooks, daher leitet dieser dasselbe JSON mit curl hinein. Jedes andere Event ist ein HTTP-Hook. Wenn das Huddle nicht läuft, schlagen die Hooks still fehl, und Claude Code arbeitet wie gewohnt weiter.

Starte (oder starte neu) eine Claude-Code-Session. Ihre Karte erscheint im Eckfenster, sobald sie startet.

Genehmigungen waren der schwierige Teil. Der PermissionRequest-Hook ist ein HTTP-Aufruf, den das Huddle offen hält, bis du klickst. Allow sendet zurück:

{ "hookSpecificOutput": { "hookEventName": "PermissionRequest", "decision": { "behavior": "allow" } } } Vollbildmodus aufrufen Vollbildmodus verlassen und Deny sendet "behavior": "deny" mit einer Nachricht, die Claude liest. Die Session macht weiter, als hättest du selbst geantwortet.

Wo du antwortest, hängt von der Session ab:

Der Server lauscht nur auf 127.0.0.1, lehnt Anfragen an jeden anderen Hostnamen ab und nimmt eine Entscheidung nur von der Seite an, die er selbst ausgeliefert hat (ein Token pro Lauf). Eine Webseite, die du besuchst, kann nicht Allow für dich klicken.

Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.

Original (Englisch) anzeigen

Posted on Nov 24 • Originally published at surn.app

You ask Claude Code to fix a bug and jump into a meeting. You come back and nothing is done. It asked you one question, "can I run this?", and sat there waiting for you.

Clicking through every tab is the slow way to catch that. So I built a faster one: the huddle, a small window in the corner of my screen with a card for every Claude Code session. The code is free and open source: github.com/suren19113/agent-huddle (MIT).

This page walks through the setup step by step.

Claude Code has its own agent view, claude agents. It has 2 gaps:

I wanted every session in one place, and approvals in 1 click.

Every Claude Code session gets a card, and each card says what it's doing:

When a session asks for permission, you click Allow or Deny on its card, and the answer goes straight back to Claude.

Claude Code fires a hook at each step of a session: when it starts (SessionStart), when it's about to use a tool (PreToolUse), when it needs a permission decision (PermissionRequest), when it finishes (Stop), and a few more. Every event carries the session's session_id and cwd, and that is how each session gets its own card.

I pointed all of them at the huddle. An HTTP hook POSTs the event as JSON to a local server; the window reads from that server.

There are no dependencies to install. You can run it straight from GitHub with npx, or clone it:

git clone https://github.com/suren19113/agent-huddle.git cd agent-huddle Enter fullscreen mode Exit fullscreen mode Step 2: start the huddle npx github:suren19113/agent-huddle Enter fullscreen mode Exit fullscreen mode or, from the clone:

npm start Enter fullscreen mode Exit fullscreen mode 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 in app mode if you have one, your default browser otherwise). --port changes the port and --no-open skips the window.

npx github:suren19113/agent-huddle hooks Enter fullscreen mode Exit fullscreen mode Merge it into the "hooks" key of ~/.claude/settings.json, the settings file in your home folder. That file applies to every project, so every session on your machine reports to the same huddle. (To try it on one repo first, put it in that project's.claude/settings.json instead.)

{ "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 } ] } ] } } Enter fullscreen mode Exit fullscreen mode SessionStart only accepts command hooks, so that one pipes the same JSON in with curl. Every other event is an HTTP hook. If the huddle isn't running, the hooks fail quietly and Claude Code carries on as usual.

Start (or restart) a Claude Code session. Its card appears in the corner window as soon as it starts.

Approvals were the hard part. The PermissionRequest hook is an HTTP call that the huddle holds open until you click. Allow sends back:

{ "hookSpecificOutput": { "hookEventName": "PermissionRequest", "decision": { "behavior": "allow" } } } Enter fullscreen mode Exit fullscreen mode and Deny sends "behavior": "deny" with a message Claude reads. The session carries on as if you'd answered it yourself.

Where you answer depends on the session:

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). A web page you visit can't click Allow for you.

Originaltitel: HUDDLE: the corner window that shows which Claude Code agent is waiting on youQuelle: dev.to (dev.to). Original öffnen