A Desktop Pet That Reacts to Your AI Coding Agent
Hooking a lightweight desktop companion into coding-agent hooks turns an opaque background process into a glanceable status display without adding latency. The sprite-sheet pipeline and Tauri shell together keep the whole thing under 40 MB, a practical alternative to heavier Electron-based desktop toys.
AI video generation tools turn a single character image into short action clips. A Python script then extracts frames, removes white backgrounds, finds loopable segments, and stitches them into compact sprite sheets—quantizing the palette cuts file size by about 85% with no visible loss. The sprite sheet gets wrapped in a Tauri 2 + Svelte 5 shell that runs as a transparent, always-on-top window using roughly 37 MB of memory. A lightweight bridge script attached to the coding agent's hooks POSTs state changes to a local server inside the pet, which plays matching animations: chin-resting for thinking, gear-spinning for tool execution, a V-sign on completion, and sweat drops on errors. The bridge is designed to exit fast and never block the agent. The pet now supports three agents, skin switching, scaling, session-locked monitoring, auto-start, and auto-update. The builder is currently stuck on the next step—adding voice or text dialogue so the pet can execute desktop commands—and is asking for architectural guidance on whether to embed a dialogue loop directly or reuse an existing agent.
The hardest technical problem isn't generating the art or wiring the hooks—it's the invisible failure modes: stolen hook registrations, sub-second animation playback, and watermark artifacts that only appear after background removal.
Keeping the bridge script non-blocking is the right instinct, but it also means the pet has no back-pressure mechanism; if the agent fires events faster than the pet can render, frames will drop silently.
The jump from a passive status display to a voice-controlled execution agent is a genuine architectural fork—embedding a dialogue loop inside the pet versus routing through an existing agent have completely different security and permission models.
The conversation orbits around prompt engineering and the fragility of AI-generated desktop pets. One detailed prompt recipe surfaces, splitting a shared character base from per-action state descriptors and routing generation through free-tier image services. A separate thread flags that Codex updates can silently break drag-and-drop, with click-through and hit-zone misalignment offered as likely culprits.
What's the prompt? I'm using Codex and it just spins left and right.
chibi girl, long dark brown wavy hair, big round glasses, cute round face, big brown eyes, wearing light green oversized sweater with a small pocket patch, white shorts, simple flat 2d cartoon style, thick outlines, solid colors, white background,chibi girl, long dark brown wavy hair, big round glasses, cute round face, big brown eyes, wearing light green oversized sweater with a small pocket patch, white shorts, simple flat 2d cartoon style, thick outlines, solid colors, white background,thinking state, one hand raised touching chin, head tilted slightly to the side, eyes looking upward, thoughtful expression, a glowing yellow lightbulb icon or question mark floating above head, cartoon logic. That's one of the prompts. I generated it with DeepSeek. The first half is shared across all actions, and the part after that is the action-specific prompt you need. I sent it to Doubao or Jimeng — both have free credits you can use.
[Fist salute]
I gave the image to Codex and had it generate a Luo Xiaohei for me, but one Codex update broke compatibility. I had the AI tweak it for ages and still couldn't get drag-and-drop working. Swore off the whole thing...
Could it be a mouse click-through issue or the desktop pet's hit zone being off? I ran into both of those problems when I was building mine before.