AI usage
ws keeps track of what your agents use: tokens by agent and model, Codex’s rate limit, and the slash commands, skills and tools they ran. It reads this from the agents’ own records (Claude Code’s transcripts and Codex’s session logs) as each turn ends. Nothing leaves your machine, and it counts tokens, not dollars.
The usage dialog
Section titled “The usage dialog”prefix U opens it, as does usage at the right end of the status line
(click it) or AI usage in the main menu.
╭─ AI usage (tokens) ─────────────────────────────────────────────────────────────╮│ 1 Today 2 This week 3 Sessions 4 Commands & skills codex 78% of week ││─────────────────────────────────────────────────────────────────────────────────││ agent model output input cached sessions ││▌claude claude-opus-5-5 1.1M 600.0M 99% 19 ││ codex gpt-5 419 64.0k 90% 1 ││ ││ Output by workstream: storefront 70% · billing 20% · (none) 10% │╰─────────────────────────────────────────────────────────────────────────────────╯| Tab | Shows |
|---|---|
| Today, This week | Tokens by agent and model (output, all input, the cached share, sessions), and how the output splits across workstreams |
| Sessions | Every session with usage, newest first: when it started (● if it’s still running), agent and model, its workstream, tokens, and its first prompt. Enter on one that’s still running goes to its pane |
| Commands & skills | Slash commands, skills and MCP tools, most recently used first, then built-in tools: how many times, and how long ago |
Codex’s limit sits at the right of the tabs. It turns yellow past 75% and red past 90%, so you can see it coming before Codex stops.
C twice clears what the tab shows: today’s or this week’s usage, the
selected session’s, or (on Commands & skills) everything recorded. The
first C says what the second one would clear; any other key keeps it. See
Clearing it. Every key is in Keys and mouse.
In a shell
Section titled “In a shell”ws usage # todayws usage --week # this week, from Mondayws usage --all # everything recordedws usage --json # the same, for scriptsAI usage, today (tokens)
agent model output input cached sessionsclaude claude-opus-5-5 1.1M 612.7M 99% 19codex gpt-5 419 69.5k 83% 1
codex: 1% of its week limit used (pro plan)
Commands, skills and MCP tools, most recent first command /review-pr 2× skill update-config 11× mcp mcp__ws__memory_search 32×
Built-in tools: Bash 212× · Read 30× · Edit 18×- output is what the models wrote. input is everything they read: new input, plus what they wrote to and read from their prompt cache. cached is the share of input read from the cache, which is much cheaper and faster than new input.
- sessions counts the agent sessions that used that model in the period.
- Codex’s limit is the latest reading from Codex’s own records: how much of your plan’s window (a week, or five hours) is used. Claude Code doesn’t record its limits anywhere ws can read.
- Commands, skills and MCP tools lists slash commands you ran
(
/review-pr), skills, and tools from MCP servers (ws’s own memory tools among them), most recently used first. Built-in tools (Bash, Edit, Read) are counted on one line, busiest first.
Where it comes from
Section titled “Where it comes from”When an agent’s turn ends (or its context is about to be compacted, or the session ends), ws reads what its transcript added since last time:
| Agent | Read from | What’s in it |
|---|---|---|
| Claude Code | Its session transcript | Each response’s model and tokens (new input, cache writes, cache reads, output), every tool call, skill and slash command |
| Codex | Its session log | Running token totals (input, cached, output, reasoning), its rate limit, tool calls |
Only the sessions ws follows are counted: agents running in ws panes, with
ws’s hooks installed (ws integrate claude, ws integrate codex). Usage
is kept with memory’s session history, and repos you’ve opted out of memory
(capture = false) record nothing.
Sessions from before this aren’t counted until you ask:
ws usage backfillIt reads every recorded session’s transcript once (a few seconds for a few dozen sessions). After that, new turns are read as they end.
Clearing it
Section titled “Clearing it”ws usage clear --all # forget everything recordedws usage clear --since 2026-09-01 # from that day on (your time zone)ws usage clear --session <id> # one session; it isn't read againEach asks first (--yes skips the question). Clearing forgets ws’s counts
only; the agents’ transcripts aren’t touched. A session you clear isn’t
counted again, but after --all or --since, turns that end later are.
Usage is otherwise kept as long as memory keeps the session it belongs to:
forgetting a session (ws mem forget --session …) takes its usage too.
See also
Section titled “See also”- Memory: sessions, and what agents are given when they start
- CLI reference