{"id":341,"date":"2026-02-04T23:05:43","date_gmt":"2026-02-05T04:05:43","guid":{"rendered":"https:\/\/www.jaysonbrush.com\/?p=341"},"modified":"2026-02-04T23:05:44","modified_gmt":"2026-02-05T04:05:44","slug":"visualizing-claude-code-sessions","status":"publish","type":"post","link":"https:\/\/www.jaysonbrush.com\/index.php\/2026\/02\/04\/visualizing-claude-code-sessions\/","title":{"rendered":"Visualizing Claude Code Sessions in Real-Time"},"content":{"rendered":"\n<p class=\"lead\">I built a real-time visualization tool that displays active Claude Code sessions as characters working in a virtual office. Each session gets its own workspace, and activity updates live as Claude uses different tools.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"720\" src=\"https:\/\/www.jaysonbrush.com\/wp-content\/uploads\/2026\/02\/ai-hq-screenshot.png\" alt=\"AI HQ - Claude Code Visualizer showing multiple sessions\" class=\"wp-image-342\" srcset=\"https:\/\/www.jaysonbrush.com\/wp-content\/uploads\/2026\/02\/ai-hq-screenshot.png 1280w, https:\/\/www.jaysonbrush.com\/wp-content\/uploads\/2026\/02\/ai-hq-screenshot-300x169.png 300w, https:\/\/www.jaysonbrush.com\/wp-content\/uploads\/2026\/02\/ai-hq-screenshot-1024x576.png 1024w, https:\/\/www.jaysonbrush.com\/wp-content\/uploads\/2026\/02\/ai-hq-screenshot-768x432.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><figcaption class=\"wp-element-caption\">AI HQ displaying multiple Claude Code sessions<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The Concept<\/h2>\n\n\n\n<p>When running multiple Claude Code sessions across different projects, it&#8217;s easy to lose track of what&#8217;s happening. I wanted a heads-up display that would show me at a glance which sessions are active and what they&#8217;re doing, all without switching between terminals.<\/p>\n\n\n\n<p>The result is AI HQ: a browser-based visualization where each Claude Code session is represented by a character at a workstation. The character&#8217;s actions reflect what Claude is actually doing in real-time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How It Works<\/h2>\n\n\n\n<p>The system uses <a href=\"https:\/\/docs.anthropic.com\/en\/docs\/claude-code\/hooks\">Claude Code hooks<\/a> (PreToolUse and PostToolUse) to send events to a local Node.js server via WebSocket. The server maintains state for each session and broadcasts updates to any connected browser clients.<\/p>\n\n\n\n<p>When Claude starts using a tool, the hook fires and sends the tool name and session ID to the server. The visualization updates immediately:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Edit, Write, Bash<\/strong>: Character typing<\/li>\n\n\n\n<li><strong>Read, Grep, Glob<\/strong>: Character thinking<\/li>\n\n\n\n<li><strong>No activity for 15+ seconds<\/strong>: Character idle<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture<\/h2>\n\n\n\n<p>The stack is intentionally minimal:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Node.js server<\/strong> with WebSocket support (ws package)<\/li>\n\n\n\n<li><strong>Vanilla JavaScript frontend<\/strong> with HTML5 Canvas<\/li>\n\n\n\n<li><strong>PowerShell hook scripts<\/strong> that POST events to the server<\/li>\n<\/ul>\n\n\n\n<p>No frameworks, no build process. Just start the server and open the browser. The visualization is network-accessible, so you can display it on a secondary monitor or another machine entirely.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Session Management<\/h2>\n\n\n\n<p>Each Claude Code instance gets a unique session ID. The visualization tracks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Session title (pulled from working directory)<\/li>\n\n\n\n<li>Current state (typing, thinking, idle)<\/li>\n\n\n\n<li>Active tool being used<\/li>\n\n\n\n<li>Time since last activity<\/li>\n<\/ul>\n\n\n\n<p>A session panel displays all connected sessions with their current status, making it easy to monitor multiple projects simultaneously.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use Cases<\/h2>\n\n\n\n<p>Beyond the novelty, this is a fun solve for a real workflow problem. When you&#8217;re running Claude Code on multiple projects at once, this gives you ambient awareness without constantly switching contexts.<\/p>\n\n\n\n<p>It&#8217;s also useful for demonstrations. When showing Claude Code to others, having a visual representation of what&#8217;s happening makes the AI&#8217;s work more tangible than watching terminal output scroll by.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get It<\/h2>\n\n\n\n<p>The project is open source: <a href=\"https:\/\/github.com\/jaysonbrush\/ai-hq\">github.com\/jaysonbrush\/ai-hq<\/a><\/p>\n\n\n\n<p>Setup takes about five minutes. Install dependencies, configure the Claude Code hooks, and you&#8217;re running.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I built a real-time visualization tool that displays active Claude Code sessions as characters working in a virtual office. Each session gets its own workspace, and activity updates live as Claude uses different tools. The Concept When running multiple Claude Code sessions across different projects, it&#8217;s easy to lose track of what&#8217;s happening. I wanted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[30],"tags":[],"class_list":["post-341","post","type-post","status-publish","format-standard","hentry","category-projects"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":5,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":348,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/posts\/341\/revisions\/348"}],"wp:attachment":[{"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaysonbrush.com\/index.php\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}