Skip to content
← PortfolioRuns on localhostOpen source

Claude Agent Verse · Case study A local 3D office for watching the coding agents on my machine.

A browser-based 3D office that shows the Claude Code and Google Antigravity sessions running locally. Every session sits at a desk in its project’s pod, subagents join as interns, and a character raises an amber paddle when its agent is waiting on me.

●Claude Code + Antigravity✓72 Vitest testsShadow draws −82%
Days5
My commits19
Merged PRs13
Draw calls47% fewer
My role
Sole developer, with Claude Code as pair
Repository
1 pnpm monorepo: core, server, web
Timeline
Five days, the v1 spec done on day one
Stack
TypeScript, Node 24, React 19, React Three Fiber
01 — Timeline

19 commits, 12 on day one.

Pick a day to see what shipped.

Day 1 · 12 commitsThe whole v1 spec: the pure reducer, token auth, replay mode, hooks, then the office and its pods, ending with animated characters at their desks.
02 — Platform

One pure reducer between disk tailers and Three.js.

I often run 10 to 20 Claude Code sessions at once, and finding the one blocked on a permission prompt meant cycling through terminal tabs. The spec set five rules:

  • Observe-only
  • Body language over graphs
  • Localhost and token lockdown
  • Credentials stay unopened
  • Defensive adapters
Disk & hooks · serverClaude Code scannersessions/*.json · *.jsonlAntigravity tailerbrain/*/transcript.jsonlHook receiverPOST /api/hooks · BearereventsPure reducer · coreDomain eventsunknown types skippedreduce(office, event)→ office · zero I/O44 reducer testssynthetic events inOfficeWebSocket · 127.0.0.1Change checknew office only100 ms coalesceone snapshot at mostOrigin + token16-byte startup tokenws://Browser · web (R3F)Rooms & StaticBatchmerged per materialChibi characterspose by state · breaksTabs & inspectorclick to focus · feed
Disk & hooks: The server scans session registries, tails JSONL transcripts and takes hook events. Neither transcript format is a public API, so unknown events and malformed fields are skipped, not thrown.
03 — Key decisions

Four calls that shaped the office.

Day one

Eleven sub-issues, then an animated office

I broke the v1 spec into 11 vertical sub-issues with blocked-by links and worked through them in order. By the end of the first day, characters were animating at their project desks.

Tracer-bullet issues · blocked-by links
day one
11:21Repo, README, AGENTS.md and CLAUDE.md12:42Monorepo, Origin + token auth, interns12:47Deterministic replay mode12:5315 s waiting inference, (N) tab badge13:01Hook forwarder and /api/hooks receiver13:08install-hooks CLI, other hooks kept13:14Open-plan office and desk pods13:17Click-to-focus camera and inspector16:143D characters, per-state animations✓ v1 complete: 11 of 11 sub-issues closed
Day two

Chibi developers who take breaks

Each session gets a chibi developer generated from its session ID, and interns wear team-coloured beanies. After five idle minutes a character walks to the ping-pong table, coffee bar or lounge, and runs back when work arrives.

Body language · 5-minute breaks
StateTriggerIn the room
Workingtool_useTyping, code scrolling, tool pill
Thinkingtool_resultHand to chin, thought bubble
Waiting on youhook · 15 sAmber ! paddle, floor ring, (N) tab
Erroris_errorHands on head, red ! badge
Idleregistry idleLeaning back, arms behind head
On breakidle ≥ 5 minPing-pong, coffee bar or sofa
Day five

A second room for Google Antigravity

Antigravity has no process registry, so a conversation counts as live while its transcript changed in the last 30 minutes. Its steps map onto the same states, so waiting and breaks work with no special cases.

Room tabs · stat-only workspaces
Claude CodeAntigravity
Live whileIn the session registryTranscript changed in 30 min
ReadsRegistry and transcriptsbrain/*/transcript.jsonl
ProcessA real PIDA synthetic negative PID
Project podThe session’s projectFirst path outside ~/.gemini
StatesThe reducer’s rulesThe same AgentState values
How I worked

Built while it watched me build it

Every Claude Code session I used to build it sat live in the office. Watching them caught two bugs: finished turns stuck in working, and project paths with a dot that missed their transcripts.

Red-first Vitest · replay and preview
every ticket
1Pick the lowest unblocked ticket2Write failing Vitest reducer tests3Make them pass4Check the scene in replay or previewlive17–19 concurrent sessions watched✓ 72 of 72 tests passing
04 — Speed

An office that hadn’t changed, re-sent every second.

With 19 live sessions, the server broadcast a fresh office on every one-second tick, so the shadow map re-rendered every frame. Flip the switch to see what the fix changed.

2,432Draw calls per frame
Shadow-pass draws28982% fewer
CPU frame time8.4 msGPU time unchanged
BroadcastsOn changeAt most one per 100 ms
Static meshes1 per materialStaticBatch; moving parts stay live

Measured on a live office of 19 sessions at 3200×2000, 30 fps: draw calls −47%, shadow-pass draws −82%. GPU time was unchanged, since the frame is fill-bound at that size.

05 — Screens

A full office, no server needed.

Adding ?preview=still to the URL renders a synthetic 17-agent office across both rooms, which is how these were captured.

06 — Behind the build

One developer, Claude Code as pair.

10 / 19commits carry a Claude co-author trailer. AGENTS.md and CLAUDE.md set the loop for every ticket: failing reducer tests first, then the scene.
With Claude Code (10)Solo (9)
I directed

The spec and its 11 tickets, the security boundaries, the studio and break-zone brief, live debugging against 17–19 sessions, the profiling, and the Antigravity room.

Claude drafted

Red-first reducer and adapter tests, the procedural Three.js characters and furniture, StaticBatch, and headless Chromium checks in preview and replay mode.

How it knows an agent is waiting on me

Without hooks, a tool call with no result after 15 s turns into waiting on the next tick. With the hook forwarder, a permission request flips it at once, and a late tool_use line can’t overwrite it.

Claude sessionHook / tailerCore reducer3D office & tabassistant tool_use written to .jsonltranscript_line → state = workingExact path: PermissionRequest hook → POST /api/hooks (instant)Passive path: tick after 15 s without tool_resultstate = waiting_on_userhookWaiting blocks late tool_use overwriteAmber “!” paddle + (N) tab badge

Loopback, Origin and two tokens

Requests from a foreign Origin get a 403. The browser WebSocket needs a 16-byte startup token and the hook forwarder a 32-byte one, kept in a discovery file with mode 0600 that is deleted on exit.

A hook installer that leaves others alone

It tags only its own entry across the 10 Claude hook events, so hooks from Orca, Agent Flow or Superset stay as they are. It backs up .claude.json before writing.

Credentials stay unopened

Adapters read only session registry entries and transcripts. Per-session token files and the OAuth files in ~/.gemini are never opened.

72 tests in about 160 ms

44 reducer tests, 11 Antigravity scanner tests, 9 auth tests, 6 hook installer tests and 2 registry tests, across five Vitest files. The 3D scene is checked by eye in replay and preview mode.

TypeScriptNode.js 24React 19Three.jsReact Three FiberDrei@react-spring/threewsViteVitestClaude Code

Non-merge commits on the develop branch. Claude Code commits were made in my sessions and count as mine. Commit counts measure activity, not effort.

Lets work together

Need a successful project?

I’m available for freelance work.

Hire/Contact Me Now