Skip to content

v0.60.0 — the herd stops reading paint

Choose a tag to compare

@ralyodio ralyodio released this 17 Aug 03:30
c1560e1

The herd stops reading paint

Session state came from a regex against a screen capture. That is a guess, and
it was wrong in the two places it mattered most: a prompt left no evidence it
had ever been submitted, and the roster stopped at the edge of this machine.
PRD 0011 replaces the guess with the engine's own word.

moshcode herd hooks install claude   # state from the engine, not from its screen
moshcode herd tasks api              # every prompt, and how long each waited on you
moshcode herd serve                  # the herd over A2A v0.3.0, behind your login
moshcode herd remote add research https://…/production
moshcode herd eval datasets/refactor.jsonl --engines claude,codex

hooks install writes Claude Code's own lifecycle hooks into your settings
file — merged, never clobbered — so a session reports authority: hook instead
of a pattern match, and blocked gains sub-kinds (permission, question, menu)
that ride in --json and in notifications. Every prompt now mints a task with
its transitions and its output, in a 0600 ledger capped at 500 tasks per
session, which is what herd tasks, herd task, herd log and herd stats
read back. Blocked time is reported as what it actually is: waiting on a human.
wait --any/--all retires the polling loop every fan-out script had written for
itself. herd remote add puts a deployed agent on the roster and prompt,
read, wait and kill work on it unchanged. herd doctor will now tell you
what is wrong with rules.json rather than ignoring the file.

/usage, because that is the word everyone types

moshcode cost shipped in v0.59.0 and answers exactly what a coding agent's own
/usage answers. So typing the word you already know got you unknown command
and nothing else. It is now the same command:

moshcode usage --all --since 7d   # identical to moshcode cost

/usage in the pit, moshcode usage on the CLI, /help usage, and shell
completion all resolve to cost — one entry in the command table, so there is
no second copy to drift.

qwen counts too

qwen was listed as an engine that keeps no readable record. That has stopped
being true, so a qwen session — launched by moshcode agents qwen or by hand —
was reported nowhere at all. It writes one record per request to
~/.qwen/usage/token-usage-YYYY-MM.jsonl, and the directory it started in to
~/.qwen/projects/<slug>/chats/<session>.runtime.json, and both are now read.

Two pieces of its arithmetic are easy to get backwards, and neither is guessed
here. cachedTokens is part of inputTokens, so the fresh input is the
difference — the same trap Codex's cumulative counts set. And thoughtsTokens
is already inside outputTokens on the OpenAI-compatible path, where
completion_tokens contains reasoning_tokens; adding it would bill the
thinking twice. Only the native path, which reports Gemini's
candidatesTokenCount, has to add it back.

No Alibaba rates ship, for the same reason no OpenAI or Google rates do: the
model ids these CLIs record do not appear on a public price list, so anything
written down would be invented. qwen runs report their tokens with no dollar
figure, and the report tells you where to put your own rates.

Still unreported: gemini, kimi, deepseek and openagents. They log nothing a
reader can use, and they say so rather than showing $0.

Also

Moshpit's bulk publish streams its request instead of buffering the whole batch
in memory, and its body limit is now sized for the batch the API documents
rather than something smaller. The PWA is served from nginx and systemd on the
box that hosts it.