Run inside Claude Code Hub
Claude Code Hub shows Claude Code Memory Diagnoser as one of its tabs. The app works the same as it does standalone. This page lists the changes.
How the hub starts the app
Section titled “How the hub starts the app”The hub starts the app as a child process and sets these environment variables:
CLAUDE_HUB=1turns on hub integration.HUB_URLgives the hub address.CLAUDE_CONFIG_DIRgives the hub’s active config dir.
The app reads them at startup. The hub also gives the app its SDK, which adds GET /hub-config. It returns enabled: true and the hub URL. The browser code reads this endpoint and turns on the hub features below only when enabled is true. Standalone, the app has no /hub-config route and uses a stub of the SDK that talks to no hub. See Hub protocol v1.
Project sync
Section titled “Project sync”Press Ctrl+Alt+P to open the hub project picker. The project you pick there goes to every hub tab. Claude Code Memory Diagnoser switches to it and adds it to the top of its recent projects list.
On page load, the app picks the project in this order:
- A
?project=query parameter in the URL. - The project that the hub sent.
- The most recent project saved in the browser.
If the hub sends a project while the page is loading, the hub project is used.
You can still use the in-app picker (the folder button in the top bar, or Shift+P). The next project that the hub sends replaces your choice.
Theme sync
Section titled “Theme sync”The light/dark mode and the color theme stay the same in the hub and in the app, in both directions. If you change the theme in the app, the app sends a hub:theme message to the hub. If the hub sends hub:theme, the app applies it.
Forwarded keys
Section titled “Forwarded keys”A browser does not pass key presses from an iframe to the page that contains it. So the app sends these keys to the hub:
- Ctrl+Alt+Left and Ctrl+Alt+Right go to the previous or next hub app.
- Ctrl+Alt+Letter goes to the hub. The hub binds Ctrl+Alt+P (project picker) and Ctrl+Alt+W (config dir picker) and Ctrl+Alt+A (app launcher) and ignores letters it does not bind.
- Alt+1 to Alt+9 jump to a hub app by number.
The app does not forward Ctrl+Alt+Letter or Alt+1 to Alt+9 if the press also includes Shift or Meta. The tree navigation keys do nothing while Ctrl or Alt is held, so a hub app switch does not also move the tree selection.
The help overlay (?) shows a Hub group with the app switch keys and Ctrl+Alt+P. The app hides this group when it runs standalone. The overlay does not list Ctrl+Alt+W or Ctrl+Alt+A. See Keyboard shortcuts for the full list.
Config dir
Section titled “Config dir”The app reads its Claude config dir once, at startup. The hub starts a separate copy of the app for each config dir. When you pick a config dir with Ctrl+Alt+W, the hub shows the copy for that dir. The app then shows the memory files, rules, auto memory, and saved analysis runs for that config dir. The browser keeps a separate recent projects list for each config dir.
Security
Section titled “Security”The app has no authentication and binds to loopback by default. The hub changes these checks:
- Framing. Standalone, the app refuses to load in any frame (
frame-ancestors 'none'andX-Frame-Options: DENY). WhenHUB_URLis set, the app allows frames from its own origin, fromlocalhostand127.0.0.1on any port, and from the hub origin. A remote page still cannot frame it. - Requests. The app accepts write requests from the hub origin as well as from its own loopback origin.
- Messages. The app sends each message only to the hub origin. It accepts a message only if it comes from the parent window and from the hub origin.
For the other network settings, see CLI and configuration.