Skip to content

claudii v0.29.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Oct 09:12
· 40 commits to main since this release

Install

brew tap bmmmm/tap && brew install claudii

Added

  • Claude Opus 5.5 recognition (claude-opus-5-5, shipped Claude Code 2.1.280 as the new default Opus). _insights_model_label() (lib/cmd/insights.sh) maps *opus-5-5* → Opus 5.5 above the *opus-5* fallback (most-specific-first — a glob match would otherwise mislabel it as "Opus 5"). It's also the first in-tier price break for Opus: $4/$20 per MTok (vs. $5/$25 for Opus 5/4.8/4.7/4.6) and a 5% cache-read rate instead of the usual 10% — lib/tier.jq gets a version-aware opus-5-5 branch (inverted from the Sonnet 5 precedent: here the bare opus key keeps pricing the older ids, and the refined key prices the new, now-default one) and lib/cmd/skills-cost.sh gains its own _rates entry. _flat_1m_model() needed no change (still native 1M, matches the generic *[Oo]pus* glob). Label + rate-key asserts added to tests/test_cache.sh, tests/test_model_label_agreement.sh (whose family-agreement check now splits jq's refined key on the first - instead of assuming a -legacy suffix), and tests/test_skills_cost.sh (in/out and cache-read pinned separately, mirroring the Fable 5.1 cache-read split).
  • The cache-ttl segment names why the last request missed the prompt cache — Claude Code 2.1.260 added prompt_cache.last_miss_cause to the statusline JSON, and the segment now carries it on the warm countdown: ♨4m·miss:tools after a tool-set change, sysprompt, ttl, server, several joined with +. A miss at warm cache was invisible before (the segment only knew warm and cold). The cause shows exactly while the cached prefix is the one that miss produced — the misses counter rising stamps expires_at into the session cache (miss_exp=), and the next request, a hit, retires it. misses=/miss_causes= are persisted too, so the se detail line shows "3 miss·tools" (count + most frequent cause). (bin/claudii-cc-statusline, lib/helpers.sh, lib/cmd/sessions.sh, man/man1/claudii.1)

Fixed

  • tokens, cache, limits, tools, skills-cost and repos no longer die once the insights cache outgrows the argument list — every consumer handed the whole insights/*.json directory to jq as arguments, and the cache keeps orphaned sessions forever. At ~12k files the path list passed macOS's 1 MiB ARG_MAX: jq failed with "Argument list too long" (rc 126) and those six commands exited with no output. Headless claude -p batch jobs can create thousands of sessions a week. The file list now goes to jq on stdin (printf '%s\0' | xargs -0), which has no size limit. perf's OTEL session→repo map had the same bug but failed silently: it fell back to an empty map. gc had the same bug too. (bin/claudii-insights, bin/claudii-otel, lib/cmd/insights.sh, tests/test_insights_bulk.sh)
  • Insight commands read only the caches their window can use, and the OTEL repo map no longer travels as one argument — tokens --days 7 read all 15k caches of history, now only those modified inside the window plus one day (a cache is written after its session's last record, so an older one cannot match). Output is byte-identical, on real data 2.2 s → 1.2 s, and the cost stays flat as history grows. A pinned CLAUDII_NOW reads everything, since a pinned clock is not comparable to file mtimes. The OTEL session→repo map (~0.8 MB) went to jq as a single --argjson, which is over Linux's 128 KiB per-argument cap; it is now a --slurpfile, scoped to the window as well, and a failed map build yields {} instead of appending it to partial output. (lib/insights_stream.sh, bin/claudii-insights, bin/claudii-otel, lib/otel.jq, lib/cmd/insights.sh)
  • The OTEL receiver stores flat events by kind instead of raw OTLP batches, and perf reads only its window — the receiver appended every batch verbatim to one traces.jsonl / logs.jsonl, 4 GB after three months, so claudii perf took 82 s and hit timeouts, and claudii-otel doctor re-parsed it all to print one number. Every log record and span is now one JSON line under otel/events/<kind>-<UTC day>.ndjson (llm, err, api, tool, hook, other; a body that is not OTLP goes verbatim to unparsed), attributes under their own keys with the type as received, the OTLP envelope gone and the five identity constants Claude Code puts on every record (user e-mail, user/account ids, organization id) no longer stored locally — the optional forward still carries the batch verbatim. Closed days are gzipped and their perf samples extracted from the llm/err files into small otel/rows/ files; rows are derived and rebuilt when the extraction changes. On a 72-day capture: 3.7 GB raw → 135 MB events, perf 90d 9.8 s → 6.8 s, output byte-identical. The receiver writes otel/receiver.status (sha of the file it runs, last batch, forward ok/failed/dropped counters — failures were only logged with CLAUDII_OTEL_VERBOSE before) and survives a full disk and a closed stderr (every write guarded, the 200 always sent). doctor shows today's events per kind, the forward counters, and DRIFT when the running receiver is a stale copy of the repo file. Existing data (claudii ≤ 0.28 kept traces.jsonl / logs.jsonl): it is not read any more. First restart the receiver (launchctl kickstart -k gui/$(id -u)/com.claudii.otel-receiver — an old one keeps writing the old files, which nothing reads), then run the one-off conversion doctor prints: cat ~/.cache/claudii/otel/{traces,logs}.jsonl | claudii-otel receiver --flatten ~/.cache/claudii/otel/events --tag legacy. It dates every record by its own timestamp (55 s for 370k batches on a 72-day capture), is safe next to a running perf (writes .part files, renamed at the end) and refuses to run twice for one tag, so nothing is counted double; move the old files away afterwards. (bin/claudii-otel-receiver, bin/claudii-otel, lib/otel_rows.jq, lib/otel_doc.jq, man/man1/claudii.1, docs/architecture.md; lib/otel-extract.jq, lib/otel.jq, lib/otel_split.awk removed)
  • claudii search and clq start in a workspace that exists — the default ~/claude-search was never created, so search died with two error lines and clq silently started Claude in whatever directory the shell was in. The default is now ~/search, created on first use, and it stays outside the claudii checkout on purpose (Claude Code loads CLAUDE.md from the start directory upwards). An existing ~/search of your own is used as is — point search.dir elsewhere if that folder is something else. search.dir still overrides it; @search (the new aliases.clq.dir default) makes clq follow search.dir. Check your config: a search.dir / aliases.clq.dir of ~/claude-search copied from the old defaults keeps pointing there — claudii config set search.dir ~/search and claudii config set aliases.clq.dir @search. (lib/search_dir.sh, lib/cmd/config.sh, lib/functions.zsh, config/defaults.json, man/man1/claudii.1)
  • claudii perf is faster everywhere and 5–8× faster on long OTEL windows, output unchanged — perf 90d took 47 s (74 s with a cold cache): 22 s went to one [[ "$merged" == "{}" ]] on the ~60 MB merged JSON, which /bin/bash 3.2 under a UTF-8 locale pattern-matches character by character, and ~8 s to copying that string through variables and here-strings. That data no longer passes through bash at all: jq reduces it to what perf shows right where it is produced — claudii-otel build --render rows|json in one pass for OTEL, a pipe after the merge for transcripts (programs in lib/perf_rows.jq / lib/perf_json.jq). Each latency list is sorted once instead of once per percentile, without a regex per row. The OTEL session→repo map comes from an insights-repomap.tsv log that claudii-insights aggregate maintains (appended per session, rewritten when duplicates pass twice the cache count) instead of parsing every insights cache (3 s at 15k caches). Same frozen data, nine cases (text, --json, --repo, transcript) byte-identical to before: 90d 74.5 s → 9.3 s, 7d 7.7 s → 2.8 s, transcript 30d 19.8 s → 9.8 s. A failing OTEL build now falls back to the transcript estimate instead of ending perf silently. The by-repo and by-session groups are computed only when perf renders them (without / with --repo), and the OTEL rows pass through with their repo assigned in place instead of being rebuilt — perf 90d 9.8 s → 6.8 s on the same data, still byte-identical. (lib/cmd/perf.sh, lib/perf_*.jq, lib/otel_doc.jq, bin/claudii-otel, bin/claudii-insights, docs/gotchas.md)
  • CLAUDII_NOW (the cost --forecast clock pin) now covers every rolling --days window, and rejects garbage instead of silently ignoring it — limits/cache/tokens/tools/session/repos/perf all read their cutoff through bin/claudii-insights merge or _window_cutoffs, neither of which consulted the seam before; a bad value (CLAUDII_NOW=junk) died on an unbound-variable reference inside the date arithmetic and silently returned every session ever cached instead of erroring. (bin/claudii-insights, lib/timefmt.sh, man/man1/claudii.1)


Homebrew SHA256: f2091e0cf41bdb59ec9e8014e6fa65c1857fb12caff54609e970c201231d424d