The Tamagotchi for AI Agents: Inside paulrobello/claude-office

How a pixel-art simulation reverse-engineers undocumented terminal logs to make invisible LLM workflows physical.

6 min read • View on GitHub • More from paulrobello

A retro-futuristic isometric 2D office scene in black and white crosshatching. A mechanical boot stomps down overflowing crumpled paper in a massive metal trashcan, while identical robot workers step out of an elevator.
The visual metaphor of Claude Office physicalizes abstract LLM concepts like context window compaction and subagent generation.
Key Takeaways

Physicalizing Technical Debt

We are transitioning from simple chatbots to complex agentic workflows. Yet, our tools are still stuck in the terminal. When an AI spawned five subagents to refactor a codebase, it was completely invisible to the user until the terminal spit out a result. Claude Office acts as a visual twin for the CLI. It translates abstract concepts into physical metaphors.

A context window is no longer a number. It is a trashcan filling with paper. Token usage is a stock ticker on a whiteboard. Subagents are employees arriving in an elevator. It is a Tamagotchi for the post-CLI developer, built entirely on a clever hack of undocumented log files.

Tailing the Ghost in the Machine

Anthropic never built a visualizer API for their agent CLI. The entire project is a sophisticated log-tailing exercise. The core Python backend uses a TranscriptPoller to continuously watch undocumented JSONL files in local session directories.

async def poll_logs(self, agent):
    with open(agent.filepath, 'r') as f:
        f.seek(agent.file_position)
        for line in f:
            self.process_event(json.loads(line))
        agent.file_position = f.tell()

It performs incremental reads to extract tool use and thought blocks without parsing the whole file every tick. This prevents the application from choking on massive context logs.

The Ambient Sync Pipeline demonstrates how background terminal logs trigger real-time 2D sprite animations.

The Late-Linking Problem

Because subagents spawn asynchronously and logs arrive out of order, mapping text to a synchronous 2D game state is difficult. The backend state machine has to resolve orphan agents that appear in the logs before their parent process acknowledges them.

The developer solved this with a fallback linking system. It matches undefined agents to native IDs using a FIFO arrival queue. It is classic distributed systems logic applied to a pixel-art game.

Type Safety Across the Void

A close-up of a heavy industrial loom fed by a continuous paper ticker tape covered in raw monospace code. The mechanical arms perfectly organize the chaotic tape into a neat grid of physical wooden blocks on a conveyor belt.
Parsing undocumented logs requires strict structure to prevent catastrophic frontend failures.

Relying on undocumented JSON structures is notoriously brittle. A single silent update to the CLI format could break the entire visualization. The project mitigates this with a robust make gen-types pipeline.

This pipeline automatically synchronizes the Python Pydantic models with the Next.js TypeScript interfaces. If the log format changes, the type system catches the drift before the frontend attempts to render a corrupted state.

The End of the Solitary Terminal

Claude Office represents a shift in how we interact with autonomous systems. Tools like Atelier and Claudeck attempt to bring agentic capabilities to the browser or native desktop, but they still rely on traditional text interfaces.

As AI performs more autonomous work, developers require ambient awareness. Glancing at a 2D game state out of the corner of your eye is vastly superior to staring at scrolling terminal text. The terminal is for active coding. The office is for supervision.