APPLIED FIELD STUDY·AGENT TOPOLOGY & CONTEXT ISOLATION

Can a better terminal collapse an AI org chart?

I accidentally built five nested layers of AI agents in three weeks. Then Superlogical released Rex 1.0.1 with a native program status protocol (OSC 7501). I installed Rex and Antigravity CLI on my Mac Mini to measure which layers actually disappear and which ones refuse to die.

Host: Mac Mini (macOS 15.8.1) Multiplexer: Superlogical Rex 1.0.1 (API rev 31) Agent CLI: Antigravity CLI 1.5.24 Transport: Unix socket + SSH

I did not plan to build middle management out of AI threads. It just happened organically over three weeks of living inside real coding agents. Coding sessions on my Mac Mini filled up with diffs, failing tests, and branch noise. So I added Pip to bridge Slack and the outside world. Then I started using threads on my laptop to watch the Mini from off the machine. Then one calm HQ thread on my laptop started coordinating the other laptop threads, while I sat outside sipping coffee.

It felt like a set of Russian dolls. Every time a thread got deep into real execution, asking it to zoom out made it sloppy, so a quieter observer naturally formed one ring outside it.

When Mitchell Hashimoto's team shipped Rex (a persistent terminal server with a JSON CLI, a Lua event bus, and OSC 7501 structured status reporting), I wanted to test a real engineering hypothesis instead of just joking about the org chart: how much of that 5-layer stack was just missing terminal plumbing, and how much of it is a hard law of context isolation?

01 · Interactive Architecture

Toggle the stack: before and after Rex

Flip between the original five Russian dolls and the Rex-backed stack, or click any shell to inspect its context boundary and what survived the experiment.

Click any shell to inspect boundary
05Me, with coffee
Outside the stack
Holds taste, picks direction, makes the judgment calls.
04HQ thread
Laptop · Master
Tracks priorities across parallel streams without opening a repo.
03Off-box observer threads
Laptop · Watchers
Supervises Mac Mini coding work and polls for completion or blocks.
02Pip bridge
Slack & memory
Connects Slack, teammates, and durable memory to the Mac Mini.
01Coding agents on Mac Mini
T3 Code / Rex panes
Writes diffs, runs test suites, juggles git worktrees and build logs.
02 · Real Measurements from rb-1

The 99× context wall between status and capture

We ran a live 3-pane workspace inside Rex 1.0.1 on the Mac Mini: a 48-spec test runner, a permission-gated database migration that paused for supervisor approval via rex send, and an agent verification pane. Then we measured the exact byte size of reading each pane through OSC 7501 program_status versus raw rex capture.

Measured rb-1 payloads (real run)
OSC 7501 program_status99× smaller
193 B
1 line · ~48 tokens
Raw rex capture (--trim)Scrollback cap: 64 MiB
19,094 B
291 lines · ~4,775 tokens
Supervisor context simulator (based on measured per-pane rates)
Structured OSC 7501 checks: ~192 tokens  ·  Raw capture polling: ~95,500 tokens
03 · The Day-1 Gap & Antigravity CLI Bridge

Wiring Antigravity CLI into Rex's status bus

Here was the genuine surprise from testing Rex 1.0.1 hands-on: running rex skill setup only wires a SessionStart hook for Claude Code and does not auto-wire Antigravity CLI or emit OSC 7501 status updates yet. Without a status emitter, any supervisor trying to watch coding agents falls right back into rex capture scraping.

Because Antigravity CLI exposes full lifecycle hooks (SessionStart, PreInvocation, PreToolUse, PostToolUse, and Stop), we built a 150-line bridge that writes OSC 7501 escape sequences directly to the Rex block's PTY device while keeping hook stdout clean JSON. Step through the actual 5-event trace captured live on rb-1 below.

Real rb-1 trace (16:00:18.289 → 16:00:20.227) Total lifecycle telemetry: 517 bytes
agy hook → rex-agy-hook → /dev/ttys PTY → Rex OSC 7501 → rex-watch.lua
Live Rex Lua observer output
Hook JSON returned to Antigravity CLI

04 · What Actually Held Up

Four honest takeaways from the experiment

01 · COLLAPSED

Polling glue dies immediately

With OSC 7501 plus a 12-line Lua observer, a supervisor wakes up only on blocked, error, or done (~100 bytes each) instead of polling panes or scraping scrollback.

02 · REFUSED TO DIE

Cognitive isolation stays

Structured status tells you a pane failed in 193 bytes, not why. The moment a supervisor pulls rex capture to debug a flaky test, its context fills with noise and you still need an outer ring.

03 · DAY-1 GAP

Agents still need a status hook

Rex 1.0.1's built-in setup only hooks SessionStart today. Writing OSC 7501 directly to the pane's PTY from lifecycle hooks closes the gap cleanly for Antigravity CLI right now.

04 · TOPOLOGY

Rex sits under Pip, not instead of it

Rex is the execution plane on the Mac Mini (Unix socket + SSH). Pip stays the calm Slack and memory bridge one layer outside it, reading tiny event summaries rather than raw terminals.

05 · Reuse This Setup

The working bridge you can drop onto your Mac

The subtle trick: Antigravity CLI captures hook stdout as JSON, so printing OSC 7501 to stdout never reaches the terminal. Exporting REX_TTY=$(tty) inside Rex lets any detached hook write the escape sequence straight to the block's PTY while keeping hook JSON spotless.

Verified on Rex 1.0.1 + Antigravity CLI 1.5.24

Better infrastructure always deletes the boring layers of an org chart. Rex kills session-juggling, polling scripts, and blind screen scraping in one stroke. Yet the outer rings keep reappearing for a much simpler reason: once you are deep enough inside a problem to fix it, you are too close to see the whole board. Org charts were context isolation all along.