# Frieren Two Windows layouts for people who use Herdr together with the Claude and Codex desktop apps: every app session and every session started in Herdr is in the sidebar, one click from a Herdr tab, with any of your Claude and Codex accounts and each one's usage in view. Dressed as a fantasy party from *Frieren*: in Frieren Pixel every agent is a 16-bit pixel party member who fights, casts and camps as it works; Frieren Journey has painted portraits behind translucent terminals. ![Frieren](preview.png) The two layouts are Frieren Pixel (`frieren-pixel`) and Frieren Journey (`frieren-journey`). Both have three session lists: the Claude desktop app's sessions, the Codex desktop app's threads, and the sessions started in Herdr tabs (click to resume, right-click to switch account or agent). With an optional `spaces.json` the lists follow your Herdr spaces: each session is sorted into a space by its words and folder, the lists show the shown space's sessions, and a session opens in its own space. Sessions continued or started with the main `claude` account run with Remote Control, so the Claude desktop app lists them too. Both show each account's plan usage and say which account and model each pane runs on. UI text is English. This file describes Frieren Journey first. [Frieren Pixel](#frieren-pixel) at the end is built on top of it and lists only what differs. # Frieren Journey A wallpaper fills the whole window and shows through translucent terminals and sidebars. Every agent is a party member card with HP/MP bars, every space a place on the journey, every tab its member's face. The left sidebar also lists every saved Claude and Codex session. The top bar shows each account's plan usage as small gauges. Every pane header says which account and model that agent runs on. A results panel shows the newest files in the focused terminal's folder, with thumbnails. ![Frieren Journey](docs/journey.png) ## What you see Left to right: a 268px sidebar, then the work column. No system title bar (`"titlebar": "none"`). Behind everything is `backgrounds/frieren.jpg` (2560×1440, `fit: cover`). Terminals are 40% opaque (`terminal_opacity: 0.4`), so the picture shows through clearly. Sidebars and bars are about 78% opaque. Corners are square and frames are gold. **Sidebar** (268px, not resizable by drag; folds to a 44px rail with Ctrl+Shift+B), top to bottom: - Brand row, 46px (`journey-chrome`, `window_drag`): Frieren's face (22px) in a gold frame, `Herdr`, then `Journey · Day N` (11px, `accent`; tooltip `Journey started: YYYY-MM-DD`), a search button (opens `picker`) and the sidebar toggle. - Five lists by weight: Spaces (`journey-spaces`, 0.55, min 110), Party (`journey-party`, 2.0, min 140), Herdr sessions (`herdr-sessions`, 0.9, min 120), Claude sessions (`claude-sessions`, 0.9, min 120), Codex sessions (`codex-sessions`, 0.9, min 120). - Footer, 69px (`journey-chrome` with `footer: true`): Settings, Add machine. **Spaces** (`journey-spaces`): header `Spaces · Destinations`. Each space row is 80px: a 68px framed painting of its place, the space name, the place name in `accent` (Royal Capital, Old Ruins, Flower Hill, Forest Camp, Rampart Watchtower, Town Street, Starlit Old Tree, Moonlit Ruined Castle; the painting's tooltip names it too), and a git summary over the space's terminals: `N uncommitted files` (`ansi3`), `N unpushed commits` (`ansi2`), `N repos without a remote` (`ansi1`). With several machines the list groups by machine (`This computer`, `Loading…`), and a `New space here` row ends each group. **Party** (`journey-party`): a 31px header `Party · N members`, with `N working` in `working` on the right. Then one card per agent (padding 7, 6px apart, 1px frame: `blocked` when it needs you, `accent` when focused, else `border`): - Portrait 66×99: the character's card picture, a 15px name strip at the bottom in the character's color, dimmed to 78% while resting. Effects: working = a 24px magic circle turning every 5s plus two blinking sparkles; blocked = a 17px red `!` pulsing every 0.8s; idle = `z`, `z z`, `z z z` frames every 0.7s; done = a `✿` pulsing in `done`. - Text: the tab name (semibold) and the status (`Working`, `Needs help`, `Done`, `Resting`, 10.5px in the status color); the resumed session's title (from the session lists' caches) or `Name · Role`; a `Claude` / `Codex` tag with `account · model`; then `HP` and `MP` bars (5px; HP in `accent`, MP in `working`) with the percent left. HP is the short window (`5h`), MP the `weekly` one (else the longest). The tooltip says the window, what's left, what's used and when it resets. - Folded sidebar: a column of 34px faces with a 7px status dot. Clicking a card or face focuses the agent. **Session lists** (Herdr, Claude and Codex look the same): a header row (41px; title 11.5px in `dim`, a search icon and a refresh icon that turns into a spinner while reading), then a slim 18px row of filter chips with counts (Claude and Codex: `All · 7d · 30d · Older`; Herdr: `All · Claude · Codex`). Then sessions grouped by date: Today, Yesterday, Last 7 days, Last 30 days, Older. Codex puts a Pinned group first, and hidden sessions go to a Hidden group at the end. Group headers are 11px `dim`; a folded group shows its count and a chevron. Rows are 30px, rounded 8px: a status mark (spinner = working, hollow ring = idle, filled dot in the `blocked` / `done` color, nothing = not open), the title (13px; `dim` when it can't be opened), `⇄` in `accent` when paired with the other agent, a tag (`app` = the Claude desktop app has it open, `open` = another app holds the Codex thread), and the age (`now`, `5m`, `3h`, `2d`) in 11px `dim`. The row of the focused agent is `selected`. Herdr rows put a 12px Claude or Codex icon before the title and the account (`claude2`, `codex3`) in a small `raised` tag instead of `⇄`/`app`. When the shown space is one of the sorted spaces, the header gets a chip before the icons (16px tall, `px` 5, rounded 4, `raised`, 10.5px medium): the space's name in `foreground` while the list keeps that space's sessions, `All spaces` in `dim` when it shows every space; a click switches (kept per panel in `localStorage` `scope`). Sessions sorted nowhere go to a `Not sorted` group before Hidden, folded at first like Hidden, its header's tooltip saying why and that a right-click picks a space. An empty space says `No sessions sorted into .` (Codex: threads). **Top bar** (58px row): - `usage` block, 818px: one chip per account, 2px apart. Claude chips (78×32px) show the name and the weekly % (10.5px), with a 3px bar under them. Codex chips (104px) show the name and the fullest window's %, a 44px bar, and the credits left plus free reset passes (`36.3k ↺2`, 9.5px). The % and bar are `done` below 70%, `working` from 70%, `blocked` from 90%. A stale reading is `dim`, a rate-limited one says `wait`, a logged-out one says `login`, and a login mismatch turns the name `working` with a `!`. Unlimited credits show as `∞`. At the right end is a `Results` button (26px tall, rounded 7, files icon): `raised`, or `selected` while the results panel is open. - `tabs` (`journey-tabs`), filling the rest; dragging it moves the window. Each tab is 46px tall: the member's face (40px frame in the character's color, dimmed when not active), the name (max 180px), a spinner or status dot, and × on the active tab. The active tab has an `accent` border on `raised`. Then `+` (new-menu), `Files` / `Changes` buttons (grimoire and quill icons) when shared `workspace.panels` lists them, and on Windows the minimize / maximize / close buttons. - `smart-paste`: a 0px block that draws nothing. **Work body** (8px padding, 8px gap): the active tab's panes as cards (radius 0, 1px `#d4b26a80` border, 1px `accent` when focused, 8px between panes, framed even when alone). Each card has a 30px header (`pane-account`) on `chrome` with a bottom border: program icon (14px), program or title (12px medium, max 260px), the folder (`~\…`, `dim`), an account chip (18px, rounded 5, `raised`, 10.5px: `claude2 · Opus 5.5 · weekly 3%`, colored like the gauges), then the status (a spinning ring in `working` color, a `Needs you` chip in `blocked`, or a 7px `done` dot). Hovering the header shows split right, split down, zoom/unzoom and close icons (14px). Hidden on the right: Herdr's Files/Changes panel (368px) and the **results** panel (400px), both with a 1px `border` frame and no radius. **Results panel**: a header (Results, the folder, pin, open folder, refresh, close), chips All / Images / Video · audio / Docs / Code, then rows: a 56×40 thumbnail (or the file type on `raised`), the name, and `subfolder · 3m ago · 1.2MB`. Hovering a row shows `Attach` and `Folder` buttons. **Status bar**, 28px: Herdr's `workspace-status`. **Colors** (`themes/frieren-journey.json`): terminal `#0b1120` on `#e9e5d9`, cursor `#7fd1b0`, accent `#d4b26a` (gold), working `#86aee8`, blocked `#e0705f`, done `#7fd1b0`, idle `#6c7591`, unknown `#b493de`. Translucency is in the alpha: `chrome` `#0d1427c8`, `surface` `#111a30c8`, `popover` `#131c33f4`, `background` `#0e1528b3` (70%, so dialogs are see-through too), `border` `#d4b26a59`, `selected` `#d4b26a2e`, `canvas` `#080d1a00` (fully clear). ## How it behaves - **Agent status** shows in three places: the session lists' row mark, the pane header (spinner / `Needs you` / dot) and the party card (magic circle / `!` / `z z z` / `✿`). Working = `working`, blocked = `blocked`, done (finished while you weren't looking) = `done`, idle = hollow ring / resting. - **Who plays whom**: slots are agent tabs first (screen order), then shell-only tabs, then a tab's second and later agents. A tab named after a character (`Fern`, `fern`, or the Korean name) gets that character, and `mods/journey-party/jobs.json` (`{"tab name": "stark"}`) wins over that. Faces already given stay; new slots take the next free character in roster order (Frieren, Fern, Stark, Himmel, Heiter, Eisen, Sein, Ubel, Land, Denken, Methode, Flamme, Serie, Kanne, Lawine, Wirbel), repeating after 16. Picks are saved in shared `journey.party` (keys `tab:` / `agent:
`), so the cards and tab faces agree and survive restarts. - **Account and model** on cards and pane headers: from the tab's command (the session lists start agents as `& 'claude2' '--resume' … '--model' …`). For an agent typed by hand into a shell, `pane-account` runs `python who.py `, which reads the running claude.exe/codex.exe's `CLAUDE_CONFIG_DIR` / `CODEX_HOME`; the header shows `account ?` until it knows (about a second). It checks again every 2 minutes and when the agent restarts. Cards ask `who.py` every 5s for unknown agents (cached 2 minutes). Model fallback: the account's default model. Clicking a pane header focuses the pane. - **Session title** on a card comes from `claude-list.json` (`cli`, `path` or `id`) or `codex-list.json` (`id`). - **HP/MP** come from `usage.json` (written by `usage-gauge`), read every 60s and again whenever shared `usage.accounts` changes. A window that reset after a failed read shows `—`. - **Places**: `mods/journey-spaces/places.json` (`{"space name": "camp"}`) pins a place; otherwise the space's name picks one of the eight, so reordering spaces doesn't change it. - **Git summary**: `git status --porcelain=v2 --branch` and `git rev-parse` in each terminal's folder (on its machine). - **Journey · Day N** counts from the first day the brand row was drawn (`localStorage` `journey.start`) and updates every 10 minutes. - **Session row click**: if a live terminal already runs that session, it gets focus. Otherwise a new tab opens in the session's folder and resumes it with the main account. Claude runs `claude --resume [--model] [--effort] [--permission-mode | --dangerously-skip-permissions]` with the desktop app's settings. Codex runs `codex resume [-s danger-full-access] [-a never|on-request]`. If the Claude desktop app (or, for another Codex account, another app) has it open, a dialog asks: Cancel / Open a copy (fork) / Continue as ``. A Herdr sessions row resumes with the account that made it (`claude2 --resume `, `codex3 resume `), and its right click offers that agent's other accounts, Open a copy, and Hide. - **Which list a session is in**: the Claude and Codex lists hold the desktop apps' sessions. A session started new in a Herdr tab goes to Herdr sessions (and is left out of the Codex list). A copy made in a Herdr tab of an app session, and a session made in another terminal and reopened in a tab, go to the Claude or Codex list, their tooltip saying `Forked in a Herdr tab from «…»` or `Made outside Herdr`. - **Session row right click**: a popup with every account of that agent ("Continue with a Claude account", each with its login email), every account of the other agent ("Hand over to Codex" / "Hand over to Claude"), and Hide from panel / Show again. Handing work over keeps one session per side. The first move creates the other side's session (Codex's own importer for Claude→Codex; a new Claude session with a fixed id for Codex→Claude, whose first message points at a Markdown hand-off of the conversation). Later moves reopen the same pair and hand over only the turns since the last move. Pairs show `⇄`. - Group headers fold and unfold on click (remembered). Lists re-read every 60s; the refresh icon reads now. - **Ctrl+Shift+S** (or a list's search icon) opens Find a session: a 680px popup near the top with an input, chips All / Claude / Codex (Tab cycles), and 11 rows of 38px. Every typed word must match the title or folder. ↑/↓/PgUp/PgDn move, Enter opens, a right click opens that session's menu, Esc closes. Opening works exactly like a click in the panel. - **Gauges**: read on start (the last reading shows at once), then every 5 minutes. A click reads now. Hover shows every window with its reset time, the login, the plan, credits, reset passes and when it was checked. Right-clicking a Codex chip asks, in a confirm dialog, whether to spend one free "Full reset" pass (the one that expires first). After it, a toast says what happened and the gauges re-read. - **Ctrl+Shift+R** or the `Results` button toggles the results panel (× closes it). It follows the focused terminal's folder (checked every 1.5s) unless pinned. It watches the folder for changes (the home folder is re-read every minute instead) and re-reads at most every 10s, only while shown. Click a file: images, Markdown and text open in a preview window (62%×78% of the window, with Attach to agent / Open in default app / Show in folder / Close). Anything else opens in its default app. `Attach` puts the file into the last focused agent's prompt as if dropped (copy as file + `terminal.paste`). - **Ctrl+V** in a terminal pastes text and copied files at once. A screenshot alone on the clipboard is saved as a PNG, put on the clipboard as a file and pasted again, so Claude Code and Codex attach it. ## Built from Files in this folder, laid out like `~/.config/herdr-app`: `layouts/frieren-journey.json` (+ `frieren-journey.png`, the settings preview), `themes/frieren-journey.json`, `backgrounds/frieren.jpg`, `keys.json`, and thirteen mods in `mods/`. **Node tree**: `root` row (divider 1px `border`) → `sidebar` column (268px, min 44, max 480, not resizable) [`brand` block (`journey-chrome`, 46px, `window_drag`), `sidebar-lists` column [`spaces` (`journey-spaces`), `agents` (`journey-party`), `herdr-sessions`, `claude-sessions`, `codex-sessions`], `sidebar-footer` block (`journey-chrome` props `{footer: true}`, 69px)] and `work` column [`topbar` row 58px [`usage` (`usage-gauge`, 818px, `window_drag`), `tabs` (`journey-tabs`, `window_drag`), `smart-paste` (0px)], `work-body` row (padding 8, gap 8) [`main` block `{tab: "active", pane: {header: {content: {mod: "pane-account"}, height: 30, position: "top", reveal: "always"}, border: {width: 1, color: "#d4b26a80"}, focus: {width: 1, color: "accent"}, radius: 0, gap: 8, lone: true}}`, `panel` column (368px, hidden, 1px `border`; a `panel-body` stack of `files` / `changes`), `results` block (`results-panel`, 400px, hidden, 1px `border`)], `status` block (`workspace-status`, 28px)]. Root also sets `background`, `theme: "frieren-journey"`, `terminal_opacity: 0.4`, `terminal_padding: [14, 12]`, `traffic_lights: [12, 16]`, `preview`. No node has its own background. **Shipped mods used**: `files`, `changes`, `workspace-status`, `menu`, `new-menu`, `picker`, `machine-add`, plus icons from `mods/workspace-chrome/` (`spinner.svg`, `search.svg`, `chevron-right.svg`, `files.svg`, `pin.svg`, `pin-off.svg`, `folder.svg`, `x.svg`, `plus.svg`) and `mods/pane/close.svg`. **Mods** (all `"place": "none"`): - `usage-gauge` (`main.js`, `usage.py`, `reset.py`): runs `python -X utf8 usage.py`, which prints `{at, accounts: [{agent, name, email, login, plan, windows: [{label, used, resets}], credits, resets, warning, error, stale, retry_at}]}` and caches it in `%LOCALAPPDATA%\herdr-sessions\usage.json`. Claude accounts are `~/.claude` plus every `~/.local/bin/claude*.cmd` that sets `CLAUDE_CONFIG_DIR`. Each reads `.credentials.json` → `GET https://api.anthropic.com/api/oauth/usage` (header `anthropic-beta: oauth-2025-04-20`; `five_hour`, `seven_day`) and, once per token, `/api/oauth/profile` for the real login. Codex accounts are `CODEX_HOME` or `~/.codex`, plus every `~/.local/share/codex-accounts/` that has a `~/.local/bin/.cmd`. Each starts the newest `%LOCALAPPDATA%\OpenAI\Codex\bin\*\codex.exe app-server --listen stdio://` with that `CODEX_HOME` (`initialize`, then `account/rateLimits/read`). Windows are named by `windowDurationMins`: up to 6h `Nh`, up to 8 days `weekly`, longer `Nd` (Claude's are `5h` and `weekly`). Claude chips show only `weekly`. Sets shared `usage.accounts` (`{name: {used, window, login, warning}}`) for the pane headers and cards. Takes command `usage-gauge.refresh`. `reset.py [--dry-run]` calls `account/rateLimitResetCredit/consume` with the soonest-expiring pass. - `claude-sessions` (`main.js`, `list.ps1`, `refresh.svg`): `list.ps1` (Windows PowerShell) reads the Claude desktop app's `%LOCALAPPDATA%\Claude-Data\claude_*\claude-code-sessions\*\*\local_*.json` (cached by size and time in `%LOCALAPPDATA%\herdr-claude-sessions\cache.json`). It finds transcripts in `~/.claude/projects/*/*.jsonl`, marks sessions the desktop app runs (from `claude.exe` command lines), adds pairs from `links.json` and the Claude rows of `derived.json` (written by `herdr-sessions`: sessions forked in a Herdr tab from these, or made outside Herdr and reopened in a tab; `origin: "derived"`, `how`, `parent`, `account`, `terminal`, `current`), lists accounts with their email and default model, and saves `%LOCALAPPDATA%\herdr-sessions\claude-list.json`. A derived session's running tab is its `terminal` when `current`. Sets shared `sessions.claude`. Takes `claude-sessions.request` (reads shared `sessions.request.claude`). Hidden ids are in shared `sessions.hidden.claude`. - `codex-sessions` (`main.js`, `list.py`, `refresh.svg`): `list.py` reads `/state_5.sqlite` read-only (`threads` where `archived = 0`, `source in ('cli','vscode')`). Pins come from `.codex-global-state.json` `pinned-thread-ids`. A thread is "open" when its `thread-writer-locks/.lock` is locked (`msvcrt.locking`). Accounts come with the models their plan lists (`models_cache.json`) and a `best` model. Saves `codex-list.json`. Another account resumes with `-c sqlite_home=
`, plus `-m ` when the thread's model isn't on its plan. From `derived.json` it drops the threads started in Herdr (`herdr.codex`), and marks (or adds, when another account's home holds them) the threads forked in a Herdr tab and the ones made outside Herdr and reopened in a tab. Shared `sessions.codex`, `sessions.request.codex`, `sessions.hidden.codex`. - `herdr-sessions` (`main.js`, `list.py`; `mod.json` title `Herdr sessions`): every 30 s runs `python -X utf8 list.py`. It takes the live terminals with a `herdr.space` label (`hc ls --json`, `hc get `) and the processes under each (toolhelp snapshot). A `claude.exe` names its session in `/sessions/.json` (each account's config from `~/.local/bin/claude*.cmd` `CLAUDE_CONFIG_DIR`); a `codex.exe` holds `/thread-writer-locks/.lock` (which process, from the Windows Restart Manager; on Codex's shared daemon, the thread is matched to the tab by folder, the tab's title and start time). Found sessions are kept in `%LOCALAPPDATA%\herdr-sessions\herdr-made.json` with a `root` decided once: `herdr` (started new in Herdr, or forked from such a session: listed here), `desktop` (an app session, or forked from one: `derived.json`, how `fork`) or `outside` (older than the tab's program: `derived.json`, how `outside`). Prints `{accounts, sessions}` and saves `herdr-list.json`. Rows: kind, account, title (Claude: custom or AI title from the transcript; Codex: the thread's name), cwd, last activity. Shared `sessions.request.herdr`, `sessions.hidden.herdr`. It never writes to Claude's or Codex's own files. Resuming with the main `claude` account adds `--remote-control ` (a copy: `<title> (copy)`), so the Claude desktop app lists it. Every 60 s it also runs `spaces.py` (`exec` timeout 180 s) and shares the answer as `sessions.spaces` (`{spaces: [{name, folder, about}], map: {"claude:<id>" | "codex:<id>": name}}`). `spaces.py` reads `%LOCALAPPDATA%\herdr-sessions\spaces.json` (`spaces: [{key, name, folder, about, words, weight}]`, `folders: {folder: key}`, `enough`; `spaces.example.json` ships next to it; without the file it prints no spaces and nothing is sorted). For every session in the three saved lists it counts each space's `words` (a case-insensitive regex) in the conversation (Claude: `user` and `assistant` text blocks, not `tool_result`; Codex: `response_item` messages, skipping what Codex adds itself: user messages that start with a tag such as `<environment_context>`, `<recommended_plugins>`, `<skill>` or `<heartbeat>`, except `<send_user_message_question_reply`, `<realtime_delegation`, `<codex_delegation` and `<hc `, plus `# AGENTS.md` and `# In app browser:`) plus 10× in the title, times the space's `weight`. Transcripts are read a line at a time and only lines that look like messages are parsed (one can be gigabytes). Codex's transcript path comes from `state_5.sqlite` (`threads.rollout_path`); when it's gone, `<path>.zst` (Codex compresses older ones) is read with the optional `zstandard` package, whole. `READING` in the script is part of the cache key, so a change to how transcripts are read counts them all again. The space a Herdr session ran in (`where`), else the longest matching `folders` entry, doubles its space's count. The best space wins with at least `enough` (8); otherwise that ran-in or folder space; otherwise unsorted. Counts are cached in `space-cache.json` by transcript size and read offset (new words reset it); more than six new transcripts are read in a process pool. The answer is also saved in `space-map.json`. - **Spaces in the three lists** (the same few helpers are in `claude-sessions`, `codex-sessions`, `herdr-sessions` and `session-menu`): a session's space is shared `sessions.space.assign[key]` (the right-click pick) or else `sessions.spaces.map[key]`. While the shown Herdr space (`spaces()`, `active`) has a sorted space's name, a list keeps the sessions of that space plus any running in one of its tabs (the terminal's `herdr.space` label); unsorted ones go to `Not sorted`, others are left out. Opening a session runs `tab.new` with its space's id, or `space.new {name, folder, tab, argv}` when no Herdr space has that name; an unsorted one opens in the shown space. The right-click menu ends with a **Space** group: one row per space (`about` as the note; the current one says `Here now · your pick` or `Here now · sorted by its words` and does nothing), plus `Sort by its words` after a pick (its note says where the words would put it). Each draw works out a session's terminal, date group and space once (a `Map` per draw); asking again in every filter takes a few hundred sessions past the time Herdr gives a draw. - `session-menu` (`main.js`, `bridge.py`): draws the popup menu (`props.menu`) and the confirm dialog (`props.confirm`). Actions are data: `tab` (with the session `key`, opened in its space), `assign` (`{key, space}`: sets or, with `null`, removes the pick in shared `sessions.space.assign`), `focus`, `confirm`, `hide`, `toCodex`, `toClaude`, `resetPass`. `bridge.py to-codex <jsonl> <cwd> <title>` / `to-claude <thread> <claude config dir>` keeps pairs in `%LOCALAPPDATA%\herdr-sessions\links.json`. It writes hand-offs to `…\handoff\*.md` (at most 120,000 characters, keeping the first request and the newest turns) and uses the app-server's `externalAgentConfig/import` for the first Claude→Codex move. - `session-search` (`main.js`; `mod.json` overlay: popup, `at: "top"`, offset 40, 680 × 0.8): reads the three saved lists (`herdr-list.json`, `claude-list.json`, `codex-list.json`) with `readTextFile`. Chips All / Herdr / Claude / Codex, one per list; Herdr rows carry a `herdr · <account>` tag, and every sorted row its space's name in a `muted` tag. Words match the title, folder and space name (placeholder `Search by title, folder or space…`). It hands the pick to the list that owns it by setting `sessions.request.<panel>` and running `<panel>-sessions.request`. Shared `sessions.search.kind` picks the starting chip. - `pane-account` (clone of shipped `pane`; `main.js`, `who.py`, five 16px stroke icons): finds its pane in `panes()`. Account and `--model` come from `terminals()` argv (a word matching `claude\d*`/`codex\d*`). Otherwise `python who.py <terminal>`, which gets the shell pid from `hc get <t> --json`, walks the process tree (toolhelp) to the nearest `claude.exe`/`codex.exe` and reads its PEB command line and environment. Model fallback: the account's `settings.json` `model` (from `sessions.claude`). - `results-panel` (`main.js`, `recent.py`): `recent.py <folder> 80` walks folders newest-first (60,000 entries / 2.5s cap, at most 6 files per folder, home 3 levels deep, others 8, skipping `.git`, `node_modules`, `AppData`, `.claude`, `.codex`, …). It makes thumbnails (Pillow, 160px) and video posters (`ffmpeg`, 1s in) in `~/.config/herdr-app/.thumbs`, pruned after 7 days. `recent.py --preview <file>` makes an 1800px copy. The same mod draws the preview window (`openOverlay` kind `window`, key `result-preview`, `props.preview`). - `smart-paste` (`main.js`, `clip.py`): on `smart-paste.paste` runs `terminal.paste`, then `clip.py`. When the clipboard holds only a bitmap, `clip.py` saves it (Pillow `ImageGrab`) to `%LOCALAPPDATA%\herdr-sessions\clipboard\screenshot-*.png` (kept 7 days), sets it as a copied file (`Set-Clipboard -LiteralPath`), prints `image`, and the mod pastes again. - `journey-chrome` (`main.js`; `search`, `sidebar`, `settings`, `plus` icons): the brand row and the footer. - `journey-spaces` (`main.js`, `places.json`, `art/<place>.jpg` 8 paintings): the Spaces list with places and git summaries. - `journey-party` (`main.js`, `lib.js`, `jobs.json`, `cards/<id>.png`, `faces/<id>.png` for 16 characters, `magic-circle.svg`, `sparkle.svg`): the party cards. - `journey-tabs` (`main.js`, `lib.js`, `grimoire.svg`, `quill.svg`, `win-*.svg`): the tab strip and the window buttons. `lib.js` is the same file in `journey-party` and `journey-tabs` (a mod can't import outside its folder): change both. The four `journey-*` mods and `pane-account` are modified copies of Apache-2.0 code; `NOTICE` says where each comes from. **herdr API used**: `exec`, `hc`, `readTextFile`, `watchFolder`, `theme`, `settings`, `layout`, `window`, `updates`, `spaces`, `machines`, `panes`, `terminals`, `agents`, `setAgentOrder`, `focused`, `props`, `shared`/`setShared`, `nextCommand`, `openOverlay`/`closeOverlay`, `notify`, `appHome`, `home`, `localStorage`; commands `tab.new`, `tab.select`, `tab.move`, `tab.rename`, `tab.close`, `pane.focus`, `pane.split`, `pane.zoom`, `pane.close`, `agent.focus`, `space.new`, `space.select`, `space.move`, `layout.toggle`, `layout.show`, `layout.hide`, `layout.select`, `layout.resize`, `mod.open`, `app.settings`, `window.minimize`, `window.maximize`, `window.close`, `terminal.paste`. **Keys** (`keys.json`): `layout:frieren-journey` → `ctrl-shift-s: mod.open:session-search`, `ctrl-shift-r: layout.toggle:results`. `terminal` → `ctrl-v: smart-paste.paste`. **Programs it expects**: Windows 10/11, Windows PowerShell 5.1, `python` (3.10+) on PATH with Pillow (thumbnails, clipboard images) and optionally zstandard (compressed Codex transcripts, for spaces), `ffmpeg` (optional, video posters), `hc` and `git` on PATH, Claude Code at `~/.local/bin/claude.exe`, the Codex desktop app (its `codex.exe` under `%LOCALAPPDATA%\OpenAI\Codex\bin`), and the Claude desktop app for the Claude list. Extra accounts are wrappers: `~/.local/bin/claude2.cmd` sets `CLAUDE_CONFIG_DIR=%USERPROFILE%\.claude-2` and runs `claude.exe %*`. `~/.local/bin/codex2.cmd` sets `CODEX_HOME=%~dp0..\share\codex-accounts\codex2` and runs codex with `--no-daemon`. **Art**: `backgrounds/frieren.jpg` is a 2560×1440 wallpaper composed from a 736×1307 portrait found on Pinterest (not the author's own art). The backdrop is the portrait's right-edge sky stretched and blurred, with the figure sharp at full height on the right and feathered edges. The character cards and faces and the eight place paintings are listed under "Credits" in `README.md`. Swap in your own pictures at the same paths if you like. ## Watch out - **Windows only**: `msvcrt`, `ctypes.windll`, PowerShell, `.cmd` wrappers, `%LOCALAPPDATA%` paths. - **What it touches**: these mods run programs (`python`, `powershell`, `codex.exe app-server`, `hc`, `explorer`, `git`) and read files outside their folder (Claude and Codex homes, the desktop apps' data, credentials). They reach the network: `usage.py` sends each Claude account's OAuth access token to `api.anthropic.com` (usage and profile only; never printed, stored or refreshed), and the Codex app-server talks to OpenAI. They write to `%LOCALAPPDATA%\herdr-sessions`, `%LOCALAPPDATA%\herdr-claude-sessions` and `~/.config/herdr-app/.thumbs`. - `herdr-sessions` sees a session only while its tab runs and checks every 30 s, so one whose tab closes sooner can be missed. A Codex tab on the shared daemon is matched by folder, title and start time: two daemon tabs in one folder started together can swap. Run Codex with `--no-daemon` under Herdr (this lock is then the tab's own). - Spending a Codex reset pass can't be undone. Keep it behind the confirm dialog, and never spend one while testing (`reset.py --dry-run` lists them). - The Claude usage endpoint is shared with Claude Code itself and answers 429 when polled often. Honor `Retry-After` (kept as `retry_at`) instead of retrying, or the account stays limited longer. - Translucency: only `terminal_opacity` makes terminals see-through (the theme's `background` alpha doesn't). Overlay and dialog frames are painted in the theme's `background`, so it needs alpha (`b3`) for see-through dialogs. Leave node backgrounds unset so only one translucent layer paints. Mods that draw a full block paint `t.chrome` themselves. - Write each mod's `mod.json` (`"place": "none"`) before its `main.js`, or Herdr docks a copy into the layout you are looking at. - `<mod>.<command>` reaches only shown copies. `smart-paste` exists only in this layout, so the global `terminal` Ctrl+V does nothing in other layouts (use Ctrl+Shift+V there, or drop the binding). - `image()` resolves paths against the app home, so thumbnails live in `~/.config/herdr-app/.thumbs`. The leading dot keeps their writes from reloading the mods. - `journey-tabs`, like the shipped `tabs` mod, hides any node with id `panel` when shared `workspace.panels` is `[]`. This layout keeps Herdr's Files/Changes in `panel` and puts results in its own `results` block, so neither breaks the other. - The `usage` block is a fixed 818px, sized for 2 Claude and 5 Codex accounts. Set its `px` to fit yours (78px per Claude chip, 104px per Codex chip, 2px gaps, 12px between groups, about 90px for the button, 20px padding). - `list.py` has a hard-coded model preference list (strongest first) for picking `best`. Update it when the model lineup changes. - Sessions resumed by another Claude account resume by transcript path. Sessions created by a Codex→Claude move live in that account's `projects` folder, and `list.ps1` finds them through `links.json`. - Without the Claude desktop app the Claude list says it has no sessions. Without the Codex app's `state_5.sqlite` the Codex list shows the read error. - `spaces.json` is personal (project folders, client and product names): keep it in `%LOCALAPPDATA%\herdr-sessions`, never in the mod folder. A space's `name` must equal the Herdr space's name, or its sessions open in a new space of that name. - A draw that runs too long is stopped and the panel shows "This view could not be re-rendered" over its last picture. Work each session's facts out once per draw (see Spaces in the three lists) and keep `exec` out of `render`. - Remote Control assumes the plain `claude` is signed in to the same account as the Claude desktop app (a Claude subscription login). Otherwise drop `--remote-control` from `claudeArgv` and `REMOTE` from `pixel-new-menu/accounts.js`. ## Done when - `herdr-app check` passes for each of the thirteen mod folders, and `layout.switch {name: "frieren-journey"}` shows the wallpaper through 40%-opaque terminals, `Journey · Day 1`, a place painting per space, one card per running agent, the three session lists, the gauges and the face tabs in one 58px bar, and 30px pane headers. - Starting `claude2` in a new Herdr tab adds a row to Herdr sessions (Claude icon, `claude2` tag) within 30 seconds, and it stays after the tab is closed; clicking it resumes it with `claude2`. A copy of a desktop app session made in a tab (`--fork-session`) shows in the Claude list instead, its tooltip naming the original. - Within a few seconds of opening, every account has a chip with a %, or `wait` with the wait in its tooltip. A click re-reads, and the tooltip lists every window with its reset time. - A working agent's card turns its magic circle; an idle one shows `z z z`. MP is 100 minus the weekly % on that account's chip, and HP's tooltip names the `5h` window. - Renaming a tab to `Stark` puts Stark on that tab and its card. - Clicking a Claude session opens a tab running `claude --resume <path>` in its folder. Clicking it again focuses that tab, and the row shows the agent's status mark. - Right-clicking a session lists the other accounts and the other agent. Moving a session to the other agent and back reuses the same pair (`⇄` on both rows) and hands over only the new turns. - Ctrl+Shift+S opens Find a session with the input focused. Typing two words narrows the list, and Enter opens the top match exactly as a panel click would. - With `spaces.example.json` copied to `%LOCALAPPDATA%\herdr-sessions\spaces.json` and Herdr spaces named `Work`, `Projects` and `Tools`: showing `Tools` puts a `Tools` chip in each list's header and lists only its sessions (unsorted ones folded under `Not sorted`); clicking the chip shows `All spaces`. Right-click → Space → Work moves a session there at once, and `Sort by its words` puts it back. Clicking a `Work` session while `Tools` is shown opens its tab in `Work`. Typing `work` in Ctrl+Shift+S finds the Work sessions. Without `spaces.json` there is no chip and no Space group. - A Herdr session resumed with the plain `claude` account, or a new `claude` from the + menu (`herdr-<two words>`), shows in the Claude desktop app's list as connected. A minimized desktop app may not refresh its list until it's shown. - A pane started from the panel shows `claude2 · <model> · weekly N%` in its header. An agent typed by hand (`codex3`) shows its account within about 3 seconds. - Ctrl+Shift+R and the `Results` button open and close the results panel (the button is lit while open). A new image saved in the focused folder appears with a thumbnail, and `Attach` puts its path into the agent's prompt. - With only a screenshot on the clipboard, Ctrl+V in Claude Code adds an attached image. - Folding the sidebar (Ctrl+Shift+B) leaves a column of faces; unfolding brings the cards back. # Frieren Pixel The same workspace drawn as a 16-bit RPG. Every agent is a pixel party member on a little stage, acting out the kind of work the agent is doing. On a battle stage above the terminals the panes of the shown tab meet in one scene cut from the background: while any of them works they fight a long battle in three waves (each kind of work its own move, normal attacks in between, and each character's own special move when its SP gauge fills), celebrate when one is done, and pass the time at camp when all rest. Seven pixel scenes take turns as the background, one per hour, and the whole palette follows the scene. ![Frieren Pixel](docs/frieren-pixel.png) ## What's different **Files**: `layouts/frieren-pixel.json` (+ `frieren-pixel.png`), `themes/frieren-pixel.json`, `backgrounds/frieren-pixel-<scene>.png` (7 scenes, 512×288 art shown ×5 at 2560×1440, 64 colors), and six mods: `pixel-chrome`, `pixel-spaces`, `pixel-party`, `pixel-tabs`, `pixel-pane`, `pixel-new-menu`. The nine tool mods are the same. The pixel mods also read `mods/journey-party/jobs.json`, `mods/journey-spaces/places.json` and run `mods/pane-account/who.py`, so the journey mods must be installed too. **Node tree**: like Journey's, with these changes. `root` row padding 8, gap 8. `sidebar` column 292px (min 64, max 480, gap 8): `brand` (`pixel-chrome`, 52px), `spaces` (`pixel-spaces`, weight 0.6), `agents` (`pixel-party`, weight 2), `herdr-sessions`, `claude-sessions`, `codex-sessions` (0.9 each, min 120), `sidebar-footer` (`pixel-chrome` props `{footer: true}`, 64px). `topbar` row 56px, gap 8: `usage` (`usage-gauge` props `{font: "Galmuri9", size: 10}`, weight 1), `tabs` (`pixel-tabs`, weight 1.3), `smart-paste` (0px). Both are weighted, not fixed: a fixed usage width pushed the window buttons out of a non-maximized window (Herdr ignores `min` on weighted items and hands nothing back from a `max`, so the mods shrink instead, see below). Under the top bar, `stage` (`pixel-pane` props `{stage: true}`, 80px). `main` pane: header `pixel-pane`, height 30, border 2px `#efe6c8a8`, focus 2px `#ffd36a`, radius 0, gap 8. Every block has a 2px `#efe6c8` border and a 180° gradient: `#22307cf2 → #0e1546f2` for the brand row and the top bar, `#1c2a74f0 → #0c123ff0` for the rest (these are the night scene's; other scenes swap them). Root: `background` `{image: "backgrounds/frieren-pixel-night.png", fit: "cover"}`, `theme: "frieren-pixel"`, `colors` (the scene's theme overrides, on one line), `ui_font: "Galmuri11"`, `terminal_opacity: 0.55`, `terminal_padding: [12, 10]`, `titlebar: "none"`, `traffic_lights: [20, 26]`. **Fonts**: `mods/pixel-chrome/fonts/` holds Galmuri11 (+ Bold), Galmuri9 and Galmuri14 (SIL OFL 1.1). Herdr loads a mod's `fonts/` at start. Sizes that render on the pixel grid: Galmuri9 at 10px, Galmuri11 at 12px, Galmuri14 at 15px. **Sprites**: each character is one COLRv0 color font, `mods/pixel-party/fonts/FrierenDot5-<id>.ttf`, family `FrierenDot5 <Name>`. One glyph is one animation frame, 32 art pixels tall: stage frames are 80 wide from U+E000 (the head at x 16), card frames 36 wide from U+E400, and the battle stage's own glyphs from U+EC00. They are drawn with `text_size(64)`, `line_height(1)` and `.frames(list, ms)`, so one art pixel is 2×2 screen pixels. The animations (first stage codepoint, frames, ms per frame): | Motion | Codepoint | Frames | ms | When | |---|---|---|---|---| | `rest` | E000 | 4 | 450 | idle | | `stand` | E004 | 2 | 650 | no status | | `think` | E006 | 4 | 170 | working, no tool on screen | | `cast` | E00A | 12 | 90 | a shell command; on cards also test, git, delete | | `read` | E016 | 6 | 220 | Read, Skill; on cards also search, plan, install | | `write` | E01C | 8 | 150 | Edit, Write, Update, Create, NotebookEdit, apply_patch; on cards also build | | `fly` | E024 | 6 | 140 | WebSearch, WebFetch, Fetch, browsing, web.run, curl | | `summon` | E02A | 8 | 130 | Agent, Task, Explore, subagents; on cards also media | | `alert` | E032 | 2 | 380 | blocked | | `victory` | E034 | 8 | 170 | done | | `eat` | E03C | 4 | 320 | camp by day, idle (a speech bubble with meat or a heart) | | `eat_l` | E040 | 4 | 320 | the same, facing left | | `rest_l` | E044 | 4 | 450 | camp by night, facing left | | `stand_l` | E048 | 2 | 650 | camp, a shell, facing left | | `alert_l` | E04A | 2 | 380 | camp, blocked, facing left | The battle glyphs (U+EC00 on, `BATTLE` in `anim.py`): poses `attack` (1), `hurt` (2, white then red), `guard` (2, with a shield, dome or barrier of the member's magic), `run` (2), `swing` (3, the third with the arc fading), `jump` (1), all 80 wide with the head at x 16; and the member's own effects at its attack tip's row: `beam` (16 wide, 2, one segment of Zoltraak), `head` (12, a bolt), `wave` (12, a slash), `orb` (12, holy light), `burst` (24, 3), `arc` (32, 2, an x-slash on the monster). `classify()` sorts the screen into 15 kinds: `think`, `cast` (a shell command not below), `test`, `build`, `git`, `install`, `delete`, `media`, `wait`, `fly`, `search`, `read`, `write`, `plan`, `summon`. Tool lines go by `RULES` (`Update Todos` → plan, `Grep`/`Glob`/`Search` → search, `Read`/`Skill` → read, `Monitor` → wait, …); a shell command (`⎿ $ cmd`, `Bash(cmd)`, Codex's `• Running cmd`) by `COMMANDS` on the command (`git`/`gh` first, then test, install, delete, media, build, wait, web, search, read). The cards borrow a motion for the finer kinds (`LOOKS`). A card's stage sits on `backdrops/<scene>-solo.png` (72×64) and the old 160×64 stage on `backdrops/<scene>-stage.png` (from `backdrop.py`, in the scene's colors), at 70% opacity when idle. **Monsters, effects and props** (`FrierenDot5 Monsters`, `FrierenDot5 Fx`, `FrierenDot5 Props`, built by `build/stage_art.py`): eight monsters, 60 wide (the sprite at x 14, room to lunge and be knocked back), each `idle` (4, a bob or a lean), `hurt` (2: a white flash, then red and knocked back), `attack` (4: wind-up, lunge, hold, back) and `spawn` (2, fading in): Wyvern, Blue Slime, Will-o'-Wisp, Frost Wolf, Grumpy Stump, Mimic, Lake Serpent, Stone Golem. Effects: damage digits in 3×5 pixel letters with an outline (white damage, gold crits, red hurt, green heals; 4 rises of 2 rows, 4 px apart), words (`MISS`, `BLOCK`, `CRIT!`, `WEAK!`, `KO!`, `COMBO!`, `ATK UP`, `RALLY!`, `FOUND!`, `COUNTER`, `HELP!`, `MIMIC!`, `BOOM!`, `FORGED!`, `TACTICS`), the HP bar (11 fills), each monster's shot and hit (fire, goo, wisp, ice, thorn, coin, water, rock), smoke, scan reticle, rune circle, light pillar, heal motes, block spark, summoning circle, sparkles, and the work kinds' things: anvil (3), forged blade (2), banner (2), aura (3), potion (2), meteor (2), blast (3), footprints, magnifying glass (2), thought bubbles (`?`, `!`, `…`, a note), map scroll (3, unrolling), ground arrow (2), hourglass (3), grimoire (2), shooting star (3), blooming flowers (4), butterfly (2), fishing rod (4, the last a bite) and training dummy (2). Props: a campfire, embers, a cooking pot with steam, a tent, a closed and an open chest, a bedroll, a signpost, a backpack, a sparkling treasure and the gold ring. The code points, widths, the monsters' shapes (top, middle, mouth) and each character's attack tip are generated into `mods/pixel-pane/stage.js`. **Specials** (`FrierenDot5 Special`, `build/special_art.py`, imported by `stage_art.py`; its code points are `STAGE.sp` in `stage.js`): per character a vertical magic circle (16 wide, 3 frames) and a big impact (48, 3) in its own colors, plus the art its move needs: Zoltraak's thick beam (16, 2, tiled), light spears (10, 4), fire pillars (56, 4), a whirlwind (40, 4), ice spikes (16, 3), a wave (48, 3) and its splash, chains (48, 3), lightning (24, 3), a storm of cuts (48, 4), a great slash (40, 3), erupting rocks (20, 3), a flash line (64, 2), an x-cut (40, 3), a pillar of judgment (40, 4) and a sanctuary circle (64, 3). Shared: the dim (64 wide, a dark and a white flash frame, rows 4 down, and `shadeTop` for the strip above), the SP gauge (14 wide: 5 levels and a white blink), a shockwave (64, 3), and banners: 5×7 letters on a ribbon (rows 1–11, text 3–9, a glint frame) for `WAVE 1`, `WAVE 2`, `BOSS`, `RAGE!`, `VICTORY!`, `SPECIAL` and every move's name. The moves (`SPECIAL` in `special_art.py`, `STAGE.sp.moves`): Frieren Zoltraak (beam), Fern Zoltraak Barrage (barrage), Serie Rain of Light (rain), Flamme Hellfire (inferno), Denken Tempest (tornado), Lawine Ice Lances (ice), Kanne Tidal Wave (tide), Methode Binding Chains (chains), Wirbel Thunderbolt (thunder), Land Mirror Army (mirror), Ubel Severing Cut (cuts), Stark Sky Splitter (skysplit), Eisen Earthshaker (quake), Himmel Hero's Flash (flash), Heiter Holy Judgment (judgment), Sein Sanctuary (sanctuary). Glyph advances equal glyph widths, so a beam or the dim is one box holding a row of the same glyph. `mods/pixel-party/build/` rebuilds the fonts from the cut sprites in `build/spr/<id>.npz` (`python anim.py <spr> <fonts> <faces> <manifest.json>`). Each glyph's `hmtx` left side bearing must equal its `xMin`, or Windows shifts each color layer on its own and the sprite gets holes. Herdr keeps a loaded family in memory, so a rebuild needs a new `FONT_VERSION` (in `anim.py` and all three `lib.js`). **Mods**: - `pixel-party` (`main.js`, `lib.js`, `faces/`, `fonts/`, backdrops, `build/`): the party list. Every 1.5s it runs `hc read <terminal>` for each agent and `classify()` (in `lib.js`) turns the last tool line into `{kind, detail}`. It understands Claude Code's `● Tool(args)`, collapsed groups (`Reading 1 file…`; a finished group like `Read 1 file, ran 2 shell commands` means thinking again), `⎿ $ cmd`, and Codex's `•` lines. It shares `pixel.activity` (`{terminal: {kind, detail, count?, status?}}`; `count`: the subagents a group line names). An agent pane `agents()` doesn't list (its `app` says claude or codex but it reports no status, e.g. a Claude Code background job) is read too, and `screenStatus()` gives it a status from the screen: a permission question → blocked, `esc to interrupt` or the spinner → working, else idle; it joins the list like the rest (click: `pane.focus`). Members that are blocked, working or done come first as cards (padding 4, about 76px, no taller than its stage): the member on the 36×32 stage, then two lines above the bars. Line 1: tab or session title and status (Needs help / Done, or while working the kind: Thinking, Casting, Testing, Forging, Rallying, Supplying, Burning, Tracking, Reading, Writing, Planning, Guarding, Scouting, Conjuring, Summoning). Line 2: the member's name in their color, `account · model` (a shell shows its battle line) and a `Claude`/`Codex` tag. Then HP and MP bars. The rest are 24px rows: face, tab, character, `HP N%`, status. Header: `PARTY N members`, `N acting`, `N need help`. - `pixel-pane` (`main.js`, `lib.js`, `plan.js`, `stage.js`): two views. - **The stage block** (props `{stage: true}`): the shown tab (`focused().tab`). Its party is `partyFor()` (in `lib.js`): one member per terminal pane, up to 4 (the focused one always in), each a different character: a pane whose pick another pane already has gets one nobody in the tab has (by a hash of its pane id). The strip is `W` art pixels wide, `W` = (window width − padding − sidebar − gap − border − 300 for the log) / 2, between 200 and 512 (checked every 2 s), cut from `mods/pixel-party/scenes/<scene>.png` (512×36 at 2×) around the scene's anchor. Everything from `plan(members, scene, night, W, pick)` is an absolutely placed glyph box. Beside it the log: the title per step (`BATTLE · Wave 1/3 · vs <foe>`, `BATTLE · Boss · vs Stone Golem`, `VICTORY · …`, or `CAMP · day` / `VICTORY`) with the tab and party, the newest log line, the one before (all three `.frames` on the same clock as the stage), and who does what. Each working member's `kinds` are the kinds of work its agent showed in the last `KIND_MS` (5 min), in the order first seen, at most 4, `think` only when there is nothing else. A new party, status, focus, width, scene or 20-minute slot plans again at once; new kinds alone wait `REPLAN_MS` (60 s) so a playing battle isn't cut off. Planning a long battle is slow in Herdr's script engine (QuickJS: a four-member plan ~13 ms, building its ~215 boxes ~21 ms) and a call that runs too long is cut off ("This view could not be re-rendered … interrupted"), so render only records what it wants planned and keeps drawing the last plan; a 150 ms timer plans and notifies. - **`plan.js`** (pure, no Herdr calls; `build/stage_dump.mjs` runs it in node): **battle** while any member works. A timeline of 90 ms steps (one loop 40–60 s) in three waves: the scene's monster (`WAVE 1` banner), another monster (`WAVE 2`), then the Stone Golem (`BOSS`). A wave has max(5, 2 × working) turns, the boss max(7, 3 × working); at half the boss's turns `RAGE!` and from then on it strikes twice. Working members take turns in order; each member's turns go through `rotation(kinds)`: every kind but `think`/`cast` followed by a normal attack. **Normal attacks** cycle four per role: fighters (Stark, Eisen, Himmel) a swing, two swings, a leaping strike with a shockwave, a dash; mages a bolt, two bolts, a bolt charged in their own magic circle, Zoltraak (a growing beam); priests a holy orb, holy rain that heals everyone, two orbs, a charged orb. **SP**: every turn adds 1 to the member's gauge (drawn over its head, blinking when full); at 4, or on a wave's last turn with 2 or more (the boss's last turn always), the turn is the member's **special**: the strip and the band above it dim (white on its big hits), the move's banner sits at the top for 14 steps with a glint, the move plays and its finishing hit does 120–260 (gold numbers). After every two turns the monster strikes back, cycling a shot at one member, a charge across the stage at the front one, and a blast at everyone: warriors and priests block, mages dodge or are hurt, a hurt member is healed by a priest. The last turn knocks it out (smoke, `KO!`, the party cheers, summoned allies vanish), the HP bar of each wave drains hit by hit; after the boss `VICTORY!` and a treasure chest. Each turn by kind: think → an attack, a `…` pause then an attack, or an aura then a crit; cast → a normal attack; test → four quick swings or a five-shot volley, `COMBO!`; build → anvil and hammer, `FORGED!`, the blade flies and falls (a crit); git → banner, `RALLY!`, auras, everyone charges a step apart; install → potion, aura, `ATK UP`, a crit; delete → three meteors and blasts, `BOOM!`; read → scan reticle, `WEAK!`, a crit; search → a `?`, the lens sweeps to the monster leaving footprints, `FOUND!`, a crit; write → rune circle and pillar (a crit); plan → map, arrows, `TACTICS` (the next strike crits; alone, it strikes itself); wait → hourglass, guard, the monster's strike is blocked, `COUNTER`; fly → a dive; media → two flickering illusions, three shots; summon → circles, allies (characters not in the tab, one per subagent, up to two) appear and attack. Blocked members call `HELP!` every 26 steps. Numbers rise from under the HP bar. Moving is done with a box at each spot, blank on the other steps, all `.frames(list, 90)` of the same length, so they stay in step; `boxes()` walks only the steps an effect was set (an actor with an ambient pose step by step), and numbers share one width so they share boxes (a four-member battle ~200–350 boxes). The plan also returns `turns` ([step, character, kind or "special"]) for previews. **victory** when one is done: a treasure chest, a grimoire over it, or the mimic (by `pick`). **camp** otherwise, by `pick` (the tab's hash + the 20-minute slot): a meal by the fire, a field of flowers with butterflies, straw-dummy training, grimoires, or fishing (lakeside, snow and meadow scenes); 22:00–07:00 asleep by the embers or a watch under shooting stars. With more than one member, the gold ring under the focused pane's member. The scene's monster: night → Wyvern, dawn-flowers → Blue Slime, meteor-night → Will-o'-Wisp, snow-north → Frost Wolf, autumn-road → Grumpy Stump, mage-library → Mimic, lakeside-town → Lake Serpent. - **The pane header**, one 30px row: a cursor when focused, the character's color square and name, the program, the battle line with the tool's detail, the folder, `account · model · weekly N%`, `Needs you` / `Done` chips, and Split right / Split down / Zoom / Close buttons on hover. - `pixel-tabs` (`main.js`, `lib.js`, `names.js` + `names.test.mjs`): tabs as inventory slots with the member's 36px pixel face and status, then the + menu (`openOverlay({mod: "pixel-new-menu", kind: "popup", width: 250, height: 560})`), Files / Changes buttons and the window buttons. The Files / Changes buttons shrink to their icons (min 38px, label truncated, tooltip) before anything pushes the window buttons out. A tab nobody named (`named` false) shows `<number> · <name>`: the title of the session its agent resumed (the resume id in its launch argv, looked up in the session panels' caches), else its first pane's repo root name, else its folder (`~` for home), else its program; the tooltip says which. Left of the face a 4×30px bar in its project's color (a hash of the repo root or folder into eight colors mixed from the theme's palette). - `usage-gauge` (+ `roomiest.js`, `roomiest.test.mjs`): the chips sit in a row that shrinks and scrolls sideways (`min_w(0)`, `overflow_x_scrollbar`); the Results button keeps its size. Per agent the account with the lowest shown use (Claude: weekly; Codex: its fullest window; ties by the other windows) among fresh, logged-in readings gets a ★ before its name, and is shared as `usage.roomiest` (`{claude: {name, used}, codex: …}`). - `pixel-new-menu` (`main.js`, `accounts.js` + `accounts.test.mjs`): Herdr's new-menu with one row per account for Claude Code and Codex (the accounts the session panels share as `sessions.claude` / `sessions.codex`, each started by its own command such as `claude2`; on another machine one row per agent), the `usage.roomiest` one first with a `most left` note, then the other agents. The main `claude` row (and a lone Claude row) adds `--remote-control --remote-control-session-name-prefix herdr` unless its command already has `--remote-control`, so the Claude desktop app lists the new session as `herdr-<two words>` (connected) until Claude titles it after the first message. - `pixel-spaces` (`main.js`, `fit.js` + `fit.test.mjs`, `art/<place>.png`, 32×32 art at 64px): `SPACES · DESTINATIONS`. Each space is a place (Royal Capital, Old Ruins, Flower Hill, Forest Camp, Rampart Watchtower, Town Street, Starlit Old Tree, Moonlit Castle) with branch and ahead/behind. With one space the block resizes itself (`layout.resize`) to its header and one slim row (the layout's `min` 76), and with two or more back to the weight it had. When the sidebar is folded it draws a 36px tile per space, gold-framed when active, with a status pip. - `pixel-chrome` (`main.js`, `icons/` 8×8 pixel SVGs, `fonts/`): the brand row (Frieren's face, `HERDR`, `Journey · Day N`, search, fold) and the footer (Settings, Add machine). The day counts from the earlier of its own start and `data/journey-chrome/store.json`, so both layouts agree. Folding saves the width in shared `pixel.sidebar.width`, hides the three session lists (`RAIL_HIDES`) and resizes `sidebar` to 64px. - `lib.js` is the same file in `pixel-party`, `pixel-tabs` and `pixel-pane`: change all three. It holds `ROSTER` (16 characters with name, role, color and attack style: `bolt`, `slash`, `holy`), `ANIMS`, `battleLine` and `classify`. Character picks are shared with Journey (`journey.party`). **Scenes**: `pixel-chrome`'s brand row picks scene `(floor(now / SCENE_EVERY) + offset) mod 7` from `SCENES` (`night`, `dawn-flowers`, `meteor-night`, `snow-north`, `autumn-road`, `mage-library`, `lakeside-town`), with `SCENE_EVERY` one hour and `offset` in shared `pixel.scene.offset` (clicking `Journey · Day N`, or the key command `pixel-chrome.next-scene`, adds one). Once a minute it reads the shown layout's file and, only if its `"image"` is one of `backgrounds/frieren-pixel-*.png`, writes it back painted in the scene with `writeTextFile`: the image path, the root `"colors"` line (replaced, or added after `"theme"`), and every block frame and gradient color swapped role by role from whichever scene's colors the file has now (a color that is no scene's is left alone). Then it shares the scene id as `pixel.scene`, which pixel-party (card stages) and pixel-pane (stage strip and monster) read. Herdr has no command for a layout's background or colors, and a layout-file edit is applied live. The footer copy doesn't rotate. **Palettes**: `mods/pixel-chrome/scenes.js`, made by `build/palettes.py` from each background: per scene a `colors` set (background, foreground, muted, dim, accent, working, idle, chrome, surface, popover, raised, hover, border, input, ring, …) and a `layout` set (frames, gradients). Every scene keeps the night scene's lightness for each role, so contrast is the same in all seven. The terminal tint is `colors.background` (alpha `c4`); an empty terminal at `terminal_opacity` 0.55 shows 0.795 × that tint over the background. The mods take colors from `theme()` and derive the rest with `alpha(c, a)` and `mix(a, b, k)` (in `lib.js`), so nothing is hard-coded to night. **Real outcomes** (`pixel-chronicle`, a 0px block in the top bar): every 2 s, `chronicle.py` gets the agent terminals, maps each to its session through `herdr-made.json` (seen < 120 s; Codex: the thread's `rollout_path` in `state_5.sqlite`) and reads only what the transcript gained. It shares `pixel.deeds` (per terminal: `context {used, full, pct}`, `question`, `hit`, `streak`, `wounds`, `tests`, `loot`) and `pixel.loot`, and appends to `journal.jsonl`. Context `full`: Claude's `modelSettings.<model>.autoCompactWindow`, else 1M for `[1m]` / 1M models, else 200k; Codex's `model_context_window`. A failed search (`rg`, `Test-Path`, …) is a miss, not a hit. The party adds MEM, INN, `Asks you` and an outcome chip; `plan()` takes `wounds / streak / tests / asks / lootName` per member (the monster targets the wounded, streak ≥ 3 = RAGE from wave 1, mode `question`). `pixel-help` is a dialog (`props.terminal` optional) that parses the waiting prompt, re-reads before sending, and sends the digit (or Codex letter) and, if the screen still shows it, arrows and Enter. The session lists are one `stack` (`sessions`) with `pixel-session-tabs` as its header. ## Done when (Frieren Pixel) - `herdr-app check` passes for the nine `pixel-*` folders, `chronicle_test.py` passes, `node --test` passes for `names.test.mjs`, `roomiest.test.mjs`, `fit.test.mjs` and `accounts.test.mjs`, and `layout.switch {name: "frieren-pixel"}` shows the pixel scene through 55%-opaque terminals, Galmuri text everywhere, and 2px cream frames. - An agent running `npm test` shows `Testing` on its card and `… unleashes a combo! npm test` in the pane header, and on the stage its member lands a combo. Reading a file switches to the grimoire within about 2 seconds, and a finished turn shows the flower field. - A blocked agent's member shows the `!` bubble, calls `HELP!` on the stage, and the card says `Needs help`. - The stage shows the shown tab's party on the scene's strip. A working agent's member fights three waves (`WAVE 1`, `WAVE 2`, `BOSS`, then `VICTORY!`): its turns follow what its agent did lately, with normal attacks in between, its SP gauge fills, and a full gauge plays its special (the stage dims, the move's banner, a white flash on the big hit). Numbers rise and each wave's HP bar drains, the monster shoots, charges or blasts everyone, the boss rages at half way. Split the tab and the second pane's member joins as a different character, the ring under the focused one. A tab with four panes still renders (no "could not be re-rendered" banner). All idle: a camp pastime. Done: a victory scene. - `node build/stage_dump.mjs mods/pixel-pane cases.json` and `stage_preview.py` draw every case as a GIF. - On the hour the background moves to the next scene by itself, and clicking `Journey · Day N` moves it on at once. The frames, gradients, accent, terminal tint, card stages and stage strip change with it, and seven moves bring back the starting scene with the file as it was. - In a window about 800px wide the tabs and the minimize / maximize / close buttons are still visible. - The fold button leaves a 64px rail of place tiles. Unfolding brings back the old width and the session lists.