The built-in Statistics plugin shows how you use CodeAlta. It adds a statistics card to each turn, and CodeAlta Desktop keeps the numbers of all your sessions over time: sessions, runs, active time, prompts, models, tokens, tools, and the cost where a provider gives one.
alta statistics commands, which agents use to read the numbers and estimate the size of a text.CodeAlta TUI has the cards and the commands, not the page.
In CodeAlta Desktop the Statistics page opens in a tab:
| Where | How |
|---|---|
| Title bar | The Statistics button, before the space switch. A small ring while history is read; a dot while it waits for your choice |
| Keyboard | Ctrl+G, then C |
| Search | Statistics, or /statistics |
| A project | Statistics of this project in the project's menu: that project only, in its own tab |
| A session | Statistics of this session in the session's menu, or Session statistics at the foot of a turn card's details: that session and its sub-agents |
| An agent | alta canvas open statistics |
| Welcome page | The Statistics card shows the last seven days; Open Statistics opens the page |
CodeAlta Desktop reads your sessions once, in the background, and keeps small counts: runs and their duration, models, tools, tokens, and file changes.
What is kept. Numbers, and a few names to tell them apart: providers, models, tools, skills, MCP tools, scripts and session titles. Never the text of prompts, answers or tool results. A file is counted by its extension; a command by its program name, never its arguments. A title is the first sentence of the first prompt, at most 80 characters, without words holding / or \. The numbers stay on your computer, and remain after a session is deleted.
The first time, nothing is read until you choose:
| Choice | What happens |
|---|---|
| Read all the history | Every session, the most recent first. Usually well under a minute |
| Last 90 days | Sessions active in that time; the statistics start that day |
| Start from today | Nothing of the past; the statistics start now |
You can also ask from a prompt:
Read my statistics history for the last 90 days.
Pause the reading of my statistics history, and tell me how far it got.
The facts of deleted sessions are kept in a separate archive, saved_statistics_after_deleted_sessions, in the state folder (~/.alta/, or ~/.alta/dev/ for a developer instance), beside a saved_statistics_after_deleted_sessions.initialized file.
.initialized file in your backups, and never delete the file to work around a problem.One tab for each question:
| Page | The question it answers |
|---|---|
| Overview | How much did I use CodeAlta, and on what? |
| Activity | When do I work, how long do runs take, how many sessions run at once? |
| Models | Which providers, models and efforts, for how many tokens, and how full does the context get? |
| Cost | What did it cost, where a cost is known? |
| Tools | Which tools, skills and MCP tools are used, how long do they take, how often do they fail? |
| Prompts | How much do I write, and how much do agents write to each other? |
| Agents | How much work goes to sub-agents, how deep, and what do automations, reminders and CodeAlta itself start? |
| Scripts | How much work runs as Code Mode scripts, which scripts, how they end, and what their sessions cost? |
| Code | How many files and lines changed? |
| Projects | Which projects and spaces take the work? |
| Sessions | The sessions of the period, sortable, each opening its session |
| Health | Errors, interrupted runs, compactions, context fill |
alta commands and the MCP servers.At the end of the Tools page, Skills lists each skill used in the period: its origin (project, yours, CodeAlta, a plugin, Claude Code, or MCP · <server>), its activations, the prompts it was attached to, the reads of its SKILL.md, where it was used and when last. MCP servers counts every MCP tool call, including those through alta mcp tool call. The skills used most recently are listed first in session prompts (see Skills).
The Scripts page counts the runs of Code Mode scripts:
workflow("name"). Inline scripts ran only the code sent to exec; Unknown scripts ran before CodeAlta recorded which script it was.The Tools page counts exec and wait as Scripts and shows how many calls of each tool scripts made. The Agents page shows who started the sessions, scripts included.
The bar at the top sets:
A click on a bar, legend entry or row adds a filter; a click on a calendar day shows that day; a drag on the strip under the main chart narrows the period. The page opens on the window's space; removing that filter shows all spaces.
While history is read, the page is usable: recent days come first, unread days are hatched, and a bar shows progress and time left, with Pause, Resume and Stop here. The page menu reads more history, forgets deleted sessions, and resets the statistics after asking.
Agents read the same numbers with alta statistics:
How much did I use CodeAlta this week compared with the week before? Give the tokens and the active time.
Which tools take the most time in the CodeAlta project over the last 30 days?
alta, and answers with the numbers.| Command | What it answers |
|---|---|
alta statistics summary |
A period at a glance, compared with the period before |
alta statistics series <metric> |
One metric over time, optionally by provider, model, project or tool. Includes sessions-at-once and context-fill |
alta statistics top <tools\|models\|projects\|sessions> |
A ranking by tokens, time or calls |
alta statistics details <list> |
Shell programs, alta commands, file kinds changed, sub-agent-depth, prompt-provenance |
alta statistics skills |
Skills used, with their uses and sessions |
alta statistics mcp |
MCP tools called, and calls per server |
alta statistics scripts |
Runs of Code Mode scripts: outcomes, each script, adoption by model, latest runs. details script-step-failed and details script-error name what failed |
alta statistics session <session> |
One session, with its sub-agents when asked. --session (and --with-children) works on summary, series, top and details |
alta statistics status |
How far the history is read |
alta statistics history ... |
Choose, pause, resume or stop reading history, or forget deleted sessions |
alta statistics estimate <text> |
Size of a text in bytes and approximate tokens |
today, yesterday, a number of days (7d, 30d, 90d, today included), week, month, last-month, year, all, or two dates.[plugins.statistics]
enabled = false
Nothing is read or updated while the plugin is off. The kept numbers stay in the database and are used again when you turn it back on.