A creature per agent session, derived from a hash and drawn in ASCII #3615
TevvvB
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A small Go thing I have been using: every agent session gets its own ASCII creature in the
status line, so several sessions across several git worktrees stop looking identical.
https://github.com/TevvvB/parallel-harness-pets
Upfront: there is no Crush-native integration. The hooks it writes are for Claude Code
and Codex. What works with Crush is the shell-prompt and tmux path, which needs nothing from
the agent at all -
pets install --harness=tmuxprints the snippet. So this is adjacentrather than integrated, and I would rather say that than imply otherwise.
The parts that might interest this crowd more than the creatures do:
It renders at 1Hz in every open session, so the hot path touches nothing. No git, no
network, no subprocess - it reads two small cache files. Everything expensive happens in a
backgrounded probe behind a lock that self-heals if the process holding it dies. That lock
was contributed by someone who found the bug where a crashed probe left a stale lock and a
worktree simply stopped updating, silently, forever.
Identity is a pure function, not a record. The species, its rarity band and its shiny
flag all fall out of a hash of the session id. Nothing is stored to decide what a creature
is, so there is no state to migrate, corrupt or sync between machines. Delete the cache and
the same session draws the same creature.
The alignment problem was the fiddliest part. A terminal renders an emoji in two cells
while Go counts it as one rune, so padding from
len()or a rune count misaligns everycolumn after a shiny's sparkle. Every creature and every one of the 16 city drawings is
padded to a fixed cell width, and there is a test asserting no row emits trailing
whitespace, because the padding that makes the grid line up would otherwise leave slack at
the end of every line.
41 species across five rarity bands, and the collection view shows which species you have
found and which of the cities you have worked in. Single static binary, no runtime deps.
Mine, so discount accordingly.
All reactions