Usage, Analyze (beta), and More Durable Attribution
This month we shipped the new git ai usage command and a lot of improvements to attribution and agent integrations.
git ai usage— local AI usage stats without a network connection or an account. Aggregates locally recorded events by period and repo:git ai usage --period 7d --repo myrepo --json.- Refreshed
git ai statsandgit ai whoami— stats output is easier to parse at a glance, andwhoamiis reorganized into API, authentication, identity, and telemetry sections. API-key-only users no longer look like a broken logged-out state. git ai analyze— an early beta of an agent-facing command for researching AI coding activity: ask the analytics backend aggregate questions, pull the sessions behind an answer, and grade transcripts at scale. It's designed to be driven by your coding agent — point it at a question and it discovers the rest from the built-in help. Expect rough edges while it's in beta.- Rewrite operations, rewritten — a ground-up rewrite of how authorship moves through rebase, squash, amend, cherry-pick, restacks, reset, stash, and revert. One object-based core fed by daemon trace2 ingestion replaces the old per-operation machinery, root-causing the attribution loss some teams saw under heavy load. An attribution fuzzer now runs randomized rewrite sequences in CI to keep it that way.
- Agent format changes, absorbed — Copilot CLI 1.0.62+ switched to Claude-format tool names, Codex Desktop sends namespaced names like
functions.apply_patch, and Cursor added anApplyPatchtool — each silently left AI edits untracked. All recognized now, along with UTF-16 hook payloads from Cursor (common with CJK content) and shell-command attribution for custom agent-v1 harnesses. - Rebase and cherry-pick edge cases —
pull --rebaseno longer drops authorship notes when the daemon starts cold, aliases likegit uppreserve authorship through the rebase, cherry-picks from local remote-tracking refs resolve correctly, and one stale checkpoint entry no longer aborts notes for an entire commit. - A leaner daemon — bounded memory across the board: pull-time attribution no longer diffs entire pulled ranges, stash/pop no longer duplicates checkpoint history, checkpoint file contents are shared instead of copied five times, and every SQLite connection gets a cache cap. Plus a bigger trace socket buffer so bursty operations on large change-sets can't stall
gititself. - Custom setups —
CODEX_HOMEandGEMINI_CLI_HOMEare respected for hook installs and transcript sweeps, Droid settings with JSONC comments install cleanly, and metrics upload now authenticates against all API URLs so self-hosted backends actually receive data. - Config and identity —
author.name/author.emailoverrides for machines where the Git committer isn't who's coding,git ai status --diff-onlyworks as documented, andapi_base_url,allow_superuser,transcript_streaming_lookback_days, andcustom_attributesare all manageable throughgit ai config.