Repository navigation
Install
brew tap bmmmm/tap && brew install claudiiAdded
- 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.5above 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.jqgets a version-awareopus-5-5branch (inverted from the Sonnet 5 precedent: here the bareopuskey keeps pricing the older ids, and the refined key prices the new, now-default one) andlib/cmd/skills-cost.shgains its own_ratesentry._flat_1m_model()needed no change (still native 1M, matches the generic*[Oo]pus*glob). Label + rate-key asserts added totests/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-legacysuffix), andtests/test_skills_cost.sh(in/out and cache-read pinned separately, mirroring the Fable 5.1 cache-read split). - The
cache-ttlsegment names why the last request missed the prompt cache — Claude Code 2.1.260 addedprompt_cache.last_miss_causeto the statusline JSON, and the segment now carries it on the warm countdown:♨4m·miss:toolsafter 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 stampsexpires_atinto the session cache (miss_exp=), and the next request, a hit, retires it.misses=/miss_causes=are persisted too, so thesedetail 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-costandreposno longer die once the insights cache outgrows the argument list — every consumer handed the wholeinsights/*.jsondirectory to jq as arguments, and the cache keeps orphaned sessions forever. At ~12k files the path list passed macOS's 1 MiBARG_MAX: jq failed with "Argument list too long" (rc 126) and those six commands exited with no output. Headlessclaude -pbatch 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.gchad 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 7read 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 pinnedCLAUDII_NOWreads 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
perfreads only its window — the receiver appended every batch verbatim to onetraces.jsonl/logs.jsonl, 4 GB after three months, soclaudii perftook 82 s and hit timeouts, andclaudii-otel doctorre-parsed it all to print one number. Every log record and span is now one JSON line underotel/events/<kind>-<UTC day>.ndjson(llm,err,api,tool,hook,other; a body that is not OTLP goes verbatim tounparsed), 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 thellm/errfiles into smallotel/rows/files; rows are derived and rebuilt when the extraction changes. On a 72-day capture: 3.7 GB raw → 135 MB events,perf 90d9.8 s → 6.8 s, output byte-identical. The receiver writesotel/receiver.status(sha of the file it runs, last batch, forward ok/failed/dropped counters — failures were only logged withCLAUDII_OTEL_VERBOSEbefore) and survives a full disk and a closed stderr (every write guarded, the 200 always sent).doctorshows 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 kepttraces.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 conversiondoctorprints: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 runningperf(writes.partfiles, 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.awkremoved) claudii searchandclqstart in a workspace that exists — the default~/claude-searchwas never created, sosearchdied with two error lines andclqsilently 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 loadsCLAUDE.mdfrom the start directory upwards). An existing~/searchof your own is used as is — pointsearch.direlsewhere if that folder is something else.search.dirstill overrides it;@search(the newaliases.clq.dirdefault) makesclqfollowsearch.dir. Check your config: asearch.dir/aliases.clq.dirof~/claude-searchcopied from the old defaults keeps pointing there —claudii config set search.dir ~/searchandclaudii 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 perfis faster everywhere and 5–8× faster on long OTEL windows, output unchanged —perf 90dtook 47 s (74 s with a cold cache): 22 s went to one[[ "$merged" == "{}" ]]on the ~60 MB merged JSON, which/bin/bash3.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|jsonin one pass for OTEL, a pipe after the merge for transcripts (programs inlib/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 aninsights-repomap.tsvlog thatclaudii-insights aggregatemaintains (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 90d9.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(thecost --forecastclock pin) now covers every rolling--dayswindow, and rejects garbage instead of silently ignoring it —limits/cache/tokens/tools/session/repos/perfall read their cutoff throughbin/claudii-insights mergeor_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