crab0.4.0

Changelog

Four releases, eight days.

Release notes for crab, derived from the tagged history. Subscribe with RSS. Changes to the session format or the ledger schema are called out explicitly, because those are the ones that cost you an afternoon.

$curl -fsSL https://crabagent.ai/install.sh | sh

v0.1.0 → v0.4.0 spans 2026-10-14 to 2026-10-22. Prebuilt binaries on Releases.

unreleased exp

on main

Added

  • A managed installer in the style of pi (curl … install.sh | sh): it downloads a precompiled release binary — no Rust toolchain needed — verifies it against the release's SHA256SUMS, and lays every version side-by-side under ~/.crab/install/releases/<ver>/.
  • A launcher at ~/.crab/bin/crab that resolves the current version at every start, symlinked into ~/.local/bin.
  • crab update and /update for checksum-verified self-update. It refuses cargo install trees with instructions rather than half-updating them.
  • CRAB_VERSION to pin a release, CRAB_UNINSTALL=1 to remove the binaries while keeping config, sessions and metrics.

Changed

  • Cold start measured properly: crab --version is ~5 ms, against ~150 ms for pi 1.3.0 on the same machine.
  • Test count reconciled with the tree: 356 tests, 3 ignored (two timing-sensitive self-spawn round trips, one subprocess helper).

v0.4.0 latest

2026-10-22

Added

  • Context compaction, in two replayable stages: deterministic tool-result shedding, then an LLM-written summary if shedding was not enough. The session file is never rewritten — compaction is recorded as an event and the model's view is rebuilt by replaying it.
  • A meter that seeds exact context occupancy and token counters at --continue, by replaying the log rather than re-estimating. The status line is correct from the first prompt.
  • Slash-command hints that complete commands and their arguments: /model lists profiles, /skill: lists skills.
  • auto_compact_threshold in config, with an environment override.

Changed

  • The status line reaches parity with pi: ↑/↓ input and output, R/W cache segments, CH cache-hit rate, cumulative $, and context as a one-decimal percentage with the window size.
  • --continue replays the session into the transcript, not just into state.
  • pi-style message spacing, and drag-to-select then release to copy (pbcopy on macOS, OSC 52 elsewhere).

Fixed

  • A ratatui rendering bug where over-wide transcript rows were clipped and a character could silently disappear off screen. Fixed with a faithful pre-wrap of the transcript.
  • Tests now use a hermetic HOME, so the suite stops spawning the developer's real MCP servers.

v0.3.0

2026-10-21

Added

  • Observability end to end. The session log became format v2 — a meta row, message rows, and typed obs events (turn start/end, LLM calls, tool calls) — with canonical-JSON content digests.
  • Four-way token usage (prompt, completion, cache read, cache write) carried from the SSE pipeline all the way to the report.
  • crab trace <file>: renders a session's span tree, with --json.
  • crab metrics [DAYS]: a SQLite ledger and a by-day / by-model report of tokens, cost, latency and tool errors, with --json.
  • Versioned pricing: multi-version rate history, peak/valley (and weekday-gated) windows, and per-call costing at the call's own timestamp. Built-in table carries verified DeepSeek and Kimi rates.
  • ~/.crab/pricing.toml overlay. Unpriced models show − rather than a fake $0.

Fixed

  • Tool-message protocol violations that poisoned sessions with provider 400s.
  • The permission modal shows the key hint first and is tall enough to read the command.
  • A comments-only user pricing file no longer warns.

v0.2.0

2026-10-16

Added

  • Fullscreen TUI with an animated running indicator (spinner plus elapsed timer).
  • /yolo and /model slash commands.
  • STORY.md: the self-hosting arc, published while it was still short.

Fixed

  • Removed the 50-turn cap — a run now continues until end-of-turn, an error, or an abort.
  • A yolo hang: survive broadcast lag, unblock the UI channel, reset the abort token.
  • Bail on a degenerate terminal instead of rendering a blank screen.
  • Dropped the dead reedline dependency; cargo fmt and clippy applied.

v0.1.0

2026-10-14

First release

  • The agent loop, six tools (read, write, edit, bash, glob, grep), provider profiles in config.toml, and the interactive terminal UI.
  • --print / --continue / --yolo / --provider / --system.
  • --provider mock: a stub provider that replays canned replies, so the loop can be debugged and tested without a network call.

Same day

  • Commit f3fec8e — the first diff produced entirely by crab: Session::len plus a unit test. The project's acceptance criterion, met on the day of the first tag.
esc