Inside HQ Console Live: The 5-Tab Monitoring Dashboard for Personal Agent Systems
When an agent runtime stops being a single chat thread—when it starts spawning isolated git worktrees, holding SHA-256 outbound approvals, enforcing MEMORY.md size caps, and running scheduled background jobs—you lose situational awareness surprisingly fast.
Without a monitoring dashboard, answering basic operational questions turns into cat archaeology across half a dozen JSON files:
- Is any outbound email, PR merge, or shell command blocked waiting for my sign-off?
- Which subagents are running right now, and which git worktree has uncommitted edits?
- How close is my long-lived coordinator thread to blowing its prompt cache or
MEMORY.mdcap? - Why did yesterday’s spend spike across models, and did any background schedule silently go stale?
Inside github.com/zjshen14/agy-hq, HQ Console Live (./bin/hq webui) is the single control screen built to answer those questions—exposing every moving subsystem in one view. (Part 1 covers how Antigravity delivers that same page on both desktop and phone.)
First, let’s tour what the dashboard monitors across all five tabs using real sandboxed --demo captures. Then we’ll go under the hood to see how it updates cleanly every 5 seconds—and four telemetry bugs uncovered by auditing 639 real sessions (2.93B gross tokens).
The Tour: Five Tabs, Five Questions
Instead of one endless scrolling log, the console splits monitoring into five tabs beneath a shared four-card KPI header (pending items, active work, today’s uncached tokens and cache-hit rate, and estimated cost vs. savings). Each tab answers one question:
| Tab | The question it answers |
|---|---|
| Needs Me | What is waiting on me? |
| Work | What is running right now, and where? |
| Memory | What does the agent remember, and is the index bloating? |
| Tokens | What is this costing, and where is the waste? |
| Ops | Did the background automation stay healthy? |
1. Needs Me — Human Approvals & Escalations
The default tab answers the highest-priority question first: What requires my sign-off or judgment before work can proceed?

Tab 1 (Needs Me): Human attention queue—isolating cryptographic approvals, escalations, goals, and low-urgency suggestions.
- Pending Approvals: Every high-blast-radius command staged via
hq proposedisplays its plain summary, exact shell command, and cryptographic hash (sha256:...). The digest guarantees that what you approve is byte-for-byte what runs—nothing can alter the command between your click and execution. - Urgent Decisions: Genuine blockers escalated by background workers render recommended vs. alternate actions (for example, investigating a 50% canary vs. holding at 10%).
- Active Goals & Overdue Replies: Tracks multi-day goals (
q4-edge-cutover) and overdue replies (people or PRs blocking progress). - Ideas Backlog: Collects low-urgency background ideas (Promote, Snooze, Dismiss) so helpful thoughts never hijack your coding chat.
2. Work — Live Threads, Git Worktrees & Two Kinds of Spaces
Once approvals are clear, Work shows what is running concurrently across your repositories:

Tab 2 (Work): Active threads, exclusive git worktree locks, scheduled Console Spaces (2/3 milestones), and Living Space launchers.
- Live Task Board: Tracks multi-turn task threads and top-level spawned workers (filtering out noisy nested helper calls) alongside model, conversation link, uncached tokens, cache-hit %, last turn summary, and inline Complete / Archive buttons.
- Active Workspaces (
core/git-worktree): Displays every checked-out git worktree (cleanvs.dirty), write lock (🔒), and open PR state—preventing parallel agents from colliding in the same directory. - Two kinds of “Spaces”: Console Spaces are scheduled domain status cards that surface during configured windows (for example, Active Engineering Pulse on weekdays 10:00–18:00 tracking dirty branches and 2/3 milestones targets). Living Spaces are full compiled interactive micro-apps launched via Open Sandboxed Space ↗ (covered in Part 3).
3. Memory — Index Caps & Keeping Private Data Out of HTML
Long-lived agent memory fails quietly when always-loaded prompt indexes bloat or when confidential personal records reach HTML views:

Tab 3 (Memory): Tracking MEMORY.md against its 40-line / 2,200-byte cap, pruning expiring facts, and keeping private/ values out of browser JSON/HTML.
- Root Index Budget (40 lines / 2,200 bytes): One combined utilization bar tracks always-loaded
MEMORY.md(15% · HEALTHY at 6 / 40 lines and 321 / 2200 B), warning before bloated prose squeezes working context. - Private data stays out of the browser: The tab confirms how many private profile fields sit on disk (“1 private profile fields (CLI-only)”) without ever serializing their values into Console JSON or HTML. When you need one, the bottom 📋 Copy CLI button copies
hq memory profile getcleanly. - Facts, Topic Wiki & Dossiers: Lists [PINNED] rules alongside expiring facts (with inline Prune buttons and top-level 🧹 Compact Facts), followed by searchable accordions for Topic Wiki & Active Playbooks and Contact & Channel Dossiers.
4. Tokens — Context Pressure, Cost Attribution & Cold Wakeups
Slowdowns and surprise token bills usually hide inside creeping context windows, hidden subagent fan-out, and evicted prefix caches:


Tab 4 (Tokens): ~512k context gauge (120k / 180k cold-wakeup marks), split coordinator/subagent spend, pure-SVG 7d/24h charts, and rule-based hygiene warnings.
Why warn at 120k when the compaction limit is ~512k? Upstream model providers typically drop warm prompt caches after roughly 5 minutes of idle time. So if a 150k-token thread sits untouched while you grab coffee, your next one-line question triggers a full 150k uncached cold prefill—a cold wakeup. Those tick marks highlight the exact zone where coffee breaks get expensive.
- Per-Model & Tree Attribution: Breaks down turns, uncached input/output, cache read (% hit), estimated API-equivalent cost, and prefix-cache savings by model—then splits spend between the coordinator’s own turns (
Self) and spawnedSubagentsso nothing is counted twice. - 7d / 24h Charts & Built-In Warnings: Renders zero-library hoverable SVG bar charts above five rule-based alerts (A1–A5), such as A1 · FrontDeskContextBloat suggesting
/compactor a fresh coordinator shift (hq release-desk).
5. Ops — Gatekeeper Quotas, Daemons & Turn Logs
Finally, Ops shows whether background automation stayed inside its safety rails:

Tab 5 (Ops): Daily auto-spawn quota meter (1 / 15), OS daemons, overdue stale chat schedules, and newest-first Turn Journal.
- Daily Auto-Spawn Budget: Tracks background trigger runs (1 / 15 with
HEARTBEAT_OK) and flips visibly toCIRCUIT OPENif runaway automation trips daily limits. - Core OS Daemons: Lists
gmail-inbox-watch,morning-brief, andsleep-consolidatewith Pause / Run Now controls and inline connector auth expiry warnings when logins need refresh. - Chat Crons & Turn Journal: Flags recurring in-conversation schedules left orphaned after restarts with an amber
stalebadge and Remove button (ad-hoc-cron), followed below by Today’s Turn Journal (newest-first) andhq doctorSystem Health checks.
Under the Hood: How It’s Built and Calibrated
All five tabs render from the single ~110 KB pure-Go template described in Part 1, serving desktop live sidecars and offline phone snapshots alike. Below is what matters specifically for keeping an all-day monitoring dashboard responsive and honest.
Architecture summary: stateful 5-second DOM updates paired with telemetry math calibrated against 639 real sessions.
1. Refreshing Every 5 Seconds Without Wrecking What You’re Reading
- Why 5-second
/api/statepolling beats WebSockets here: Polling full JSON every 5 seconds trades sub-second push updates for rock-solid simplicity—there is zero socket state to lose or reconnect when a laptop wakes from sleep, and one endpoint backs SSR first paint, live sidecars, and automated tests. - Preserving expanded trees & search typing: Before updating dynamic lists, the page records which
<details>accordions you have open and restores them right after redrawing. Search inputs live outside the replaced list containers, so typing a filter never loses focus—and write actions (Approve, Pause, Prune) add per-page CSRF validation.
2. Four Telemetry Bugs Caught Across 639 Sessions (2.93B Gross Tokens)
Our earliest Tokens numbers looked plausible on screen—until we wrote an audit script checking 639 real sessions (2.93B gross tokens, 90.845% pooled prefix-cache hit rate) directly against step logs. Four bugs jumped straight out:
-
The 54.0% Multi-Model Session Overwrite Bug:
Symptom: Mixed-model conversations appeared as if a single model ran every turn.
Cause: Raw transcript steps omit model names, so our initial collector read per-turn journal files in alphabetical directory order (-10.jsonbefore-2.json) and saved whichever model won last onto the whole conversation. Across just 13 mixed sessions, 153.4M of 284.32M uncached tokens (54.0%) landed under the wrong model.
Fix: Join each transcript step directly against its turn’s journal entry (stepStartIdx/stepCount) so multi-model sessions attribute every step accurately. -
28.9% Role-Tier Pricing Drift:
Symptom: Quota burn looked artificially inflated across mixed workflows.
Cause: Early routing checked the task’s tier hint (quick,standard,deep) before checking the actual executed model (NormalizeTier), billing cheap Flash runs spawned under[Deep]tasks at 5.0x deep weight—distorting gross weighted burn by 28.9% across 34 mismatched sessions.
Fix: Compute cost and quota weight strictly from the model that actually executed. -
Subagent Tree Double-Counting:
Symptom: A single multi-worker audit occupied multiple overlapping rows in “Top Expensive Tasks”.
Cause: Ranked tables listed standalone child workers alongside parent coordinator threads whose totals already rolled up child spend.
Fix: Split parent coordinator turns (Self) cleanly from nestedSubagentsso trees remain strictly non-overlapping. -
Stale 256k Compaction Ceilings vs. Empirical ~512k:
Symptom: Context gauges hit 100% prematurely while cold-cache stalls arrived unannounced much earlier.
Cause: Real session traces compacted near ~512k rather than 256k, whereas expensive cold wakeups already kicked in around 120k–180k.
Fix: Re-scale the bar to 512k and overlay the 120k warn and 180k crit cold-wakeup markers (explained in Tokens above).
The takeaway across all four bugs: Attribute cost to what actually ran, never to what you expected to run.
Quickstart
Launch the isolated demo dashboard locally and start on Needs Me before clicking through Work, Memory, Tokens, and Ops:
./bin/hq init --demo && ./bin/hq webui
(To inspect an existing vault with background tickers and mutating HTTP routes disabled, pass ./bin/hq webui --read-only, which implies --no-heartbeat.)
Related Reading
- Part 1 — Delivery Surfaces: One Template, Two Surfaces: How Antigravity Sidecars, Artifacts & Hook Hydration Work
- Part 3 — Composable Micro-Apps: Living Spaces: Why and How We Compile Zero-Token Interactive Micro-Apps
- Source Code: github.com/zjshen14/agy-hq
Scan with WeChat
Scan this QR code with WeChat to read or share on mobile.