Mastering AI agents
Which Claude Code status line uses the least memory? ccusage, ccstatusline and claude-pace with 6 windows open (2026)
How much memory status line tools take when six Claude Code windows are open: ccusage 18 and 20, ccstatusline, claude-pace and a jq script, measured on a 24 GB Mac with 11 GB of transcripts, plus preliminary measurements on Windows.
Kelvin Wang · · 9 min read
Key points
- Six windows refreshing at once: ccusage 20 peaks around 8 GB in total, ccstatusline 1.2 GB, claude-pace 41 MB, a stdin-only jq script 15 MB.
- ccusage 20 is much faster than 18, but its cache is invalidated whenever the transcript changes, so an active window still pays 5 to 15 seconds and over 2 GB per refresh.
- Use a stdin-only tool (claude-pace or a jq script) for the status line; run ccusage by hand for reports, upgraded to version 20.
I usually have six or seven Claude Code windows open, and my status line used ccusage to show what I had spent today. Once my transcripts passed 10 GB the whole machine slowed down. The process list showed five or six ccusage processes running at any moment, each holding 0.7 to 1.7 GB. I covered ccusage in how I calculate weekly usage with it; here I only look at the status line, where the same work repeats in every open window.
Why do status line tools use memory?
Claude Code runs your status line command again on every update (after each reply, when you switch modes) and passes a JSON object on stdin2. With six windows open, six windows keep running that command.
That JSON already holds the session cost cost.total_cost_usd and context usage context_window.used_percentage; on a subscription it also has the 5-hour and 7-day limits, rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage2. How much memory a tool needs depends on what else it reads:
- Stdin only. claude-pace4 and my own jq script work this way and need a few MB.
- The current session’s transcript as well. Some ccstatusline5 widgets (token counts, the 5-hour block timer) read the current window’s transcript, so its memory follows the size of that file. claude-hud6 works the same way, but it installs as a plugin and I did not test it.
- Every transcript. ccusage
statuslinereports today’s spend across all windows and the current 5-hour block, which means reading everything under~/.claude/projects1. The more history you have, the heavier it gets.
How did I test?
- Machine and data. Apple M4 Pro, 24 GB of memory, 11 GB and 1,380 transcript files under
~/.claude/projects. Other work was running at the time (load average around 4.8), so the timings are slower than on an idle machine. - Input. Every tool got the same stdin JSON, with
transcript_pathpointing to a copy of a real 179 MB transcript. - Measurement. macOS
/usr/bin/time -lfor wall time and peak memory (maximum resident set size). - Several windows. N copies started at once, each with its own
session_id, to simulate N windows refreshing together with no cache hits. The totals add up each process’s peak, the worst case for memory held at the same time. - Versions. ccusage 18.0.5 (what I had installed) and 20.0.51 (latest on the test day), ccstatusline 2.2.34, claude-pace as of 2026-11-10, all with default settings.
- Daily variant. The cc-usage-lite daily variant mentioned later was measured in a separate run, which also re-measured the jq script with the same results as the table.
How much memory do 1, 3 and 6 windows use?
Sum of each process's peak memory. ccusage is shown with a cache miss, which is what an active window gets on nearly every refresh.
| Tool | 1 window | 3 windows | 6 windows | Time for 6 windows |
|---|---|---|---|---|
| jq script (stdin only) | 2 MB | 7 MB | 15 MB | about 0.1 s |
| cc-usage-lite daily variant | 3 MB | 8 MB | 16 MB | about 0.1 s |
| claude-pace | 7 MB | 20 MB | 41 MB | about 0.1 s |
| ccstatusline 2.2.34 | 200 MB | 586 MB | 1,217 MB | 0.5 s |
| ccusage 20.0.51 | 2,502 MB | 4,015 MB | 7,995 MB | 20.5 s |
A single ccusage 18.0.5 run took 225 seconds and 2.5 GB, so I skipped the six-window test. It also reported today’s spend as $0.00 on my data, where version 20 reported $302.
What the numbers show:
- Stdin-only tools barely notice the number of windows. Six windows stay under 41 MB, and each run exits at once, so nothing piles up.
- ccstatusline follows the size of the current transcript. With a 444 KB transcript the same program used 85 MB and 0.1 seconds; with the 179 MB one, 200 MB and 0.5 seconds. More long sessions open means a higher total.
- ccusage 20 is far faster than 18 and still does not belong in the status line. A cold run dropped from 225 to 15 seconds, but six windows still add up to 8 GB, a third of a 24 GB machine.
Preliminary measurements on Windows
I also ran the same tools on a Windows 10 machine (AMD Ryzen 5 5600X) through Git Bash 2.56.1, which is how Claude Code runs the status line on Windows when Git for Windows is installed. That machine has none of my transcripts, so it used 256 MiB of synthetic transcripts across 40 sessions; before the runs I checked that ccusage read 19,203,100 input tokens, the number generated. Each case ran 10 times with the five tools interleaved. The chart and the table show the median of the 10 runs.
Highest summed WorkingSet of the related processes alive at the same moment. Measured differently from the Mac, so it cannot be compared with the chart above.
| Tool | 1 window | 3 windows | 6 windows | Time for 6 windows |
|---|---|---|---|---|
| cc-usage-lite (jq script) | 27 MiB | 70 MiB | 105 MiB | 0.20 s |
| cc-usage-lite daily variant | 40 MiB | 100 MiB | 197 MiB | 0.38 s |
| claude-pace | 44 MiB | 111 MiB | 219 MiB | 0.51 s |
| ccstatusline 2.2.34 | 90 MiB | 272 MiB | 510 MiB | 0.55 s |
| ccusage 20.0.51 | 206 MiB | 572 MiB | 1,059 MiB | 4.45 s |
These are preliminary, so treat the numbers as a rough guide. When reading the table:
- Memory is measured differently from the Mac, so the two tables cannot be compared. Here the WorkingSet of all related processes alive at the same moment is summed every 15 ms and the highest sum is kept. Every Git Bash process counts the shared DLLs again, so a single bash already shows 20 to 30 MiB. Very short peaks can fall between samples, so values may be low.
- Time runs until all N windows have finished.
- The history is only 256 MiB. I did not measure how ccusage behaves on Windows with more history.
- The tools display different fields, so each row is the cost of that tool’s own output, not of the same work. The daily variant’s amount comes from 40 seeded fake cache files.
The test script, machine and version details, and the raw data for all 150 runs are in the benchmarks folder of cc-usage-lite8.
Does the ccusage 20 cache fix it?
ccusage statusline caches its output: if the same session asks again within --refresh-interval (1 second by default), it returns the last result, in 0.03 seconds and 47 MB. The cache depends on both time and files1, though. When I appended one line to the transcript, the next run recomputed everything: 4.8 seconds and 2.3 GB.
In an active window the status line usually refreshes because a reply was just added, so the transcript has just changed and nearly every refresh is a recompute. That is also why raising --refresh-interval to 60 seconds on version 18 did nothing for my memory. Another user on a 24 GB Mac reported each statusline process taking 1.5 to 2.4 GB in the ccusage issues3.
Which status line should you use?
- If you only want model, context and limits, use claude-pace or a jq script. claude-pace is a single Bash file with no network calls. Besides the 5-hour and 7-day limits, it compares usage with elapsed time to tell you whether you are burning too fast, and it shows git status4. I want the bare minimum, so I use a jq script of my own.
- If you want many widgets and can spare some memory, use ccstatusline. It has an interactive setup for layout and colours. With many windows and long sessions, the total reaches the GB range.
- Keep ccusage out of the status line. What it adds, today’s spend across every window, is not in Claude Code’s stdin, and getting it exactly needs a full scan of your history. That cost comes from the approach itself; a new version only makes it faster.
- If you want a rough idea of today’s spend in the status line, estimate it. I turned my jq script into cc-usage-lite8 and added a daily variant: on every refresh, each window writes the session’s current cost to a small file, and the variant adds up today’s increments across those files. It never reads transcripts and took 16 MB for six windows on the Mac. It is only an estimate: usage with no status line (headless or SDK runs) is not counted; the cost when a session is first seen becomes its starting point and is not counted; and the stretch across midnight is assigned entirely to the new day. The variant is still in beta and has not been reconciled with ccusage over full days.
I now use the daily variant. The minimal version is the jq script below, saved as ~/.claude/statusline.sh and made executable with chmod +x:
#!/bin/sh
# Claude Code status line: reads only the JSON Claude Code passes on stdin, no transcript scanning
# Shows: model | context % | session cost | 5h / 7d limit % | directory
jq -r '
def pct: if . == null then "-" else (. | floor | tostring) + "%" end;
def reset: if . == null then "" else " (" + (. | strflocaltime("%H:%M")) + ")" end;
[
(.model.display_name // "?"),
("ctx " + (.context_window.used_percentage | pct)),
("$" + ((.cost.total_cost_usd // 0) * 100 | round / 100 | tostring)),
(if .rate_limits.five_hour then
"5h " + (.rate_limits.five_hour.used_percentage | pct) + (.rate_limits.five_hour.resets_at | reset)
else empty end),
(if .rate_limits.seven_day then
"7d " + (.rate_limits.seven_day.used_percentage | pct)
else empty end),
((.workspace.current_dir // .cwd // "") | split("/") | last)
] | join(" | ")
' 2>/dev/null || echo "statusline error"
Point the status line in ~/.claude/settings.json at it. Windows that are already open switch to the new command without a restart:
"statusLine": { "type": "command", "command": "~/.claude/statusline.sh" }
It looks like this, with the 5-hour reset time in brackets:
Opus 5.5 | ctx 42% | $3.14 | 5h 23% (14:00) | 7d 41% | my-project
After taking ccusage out of the status line, free memory on this Mac went from 49% back to 75%, about 6 GB.
How do you use ccusage once it is out of the status line?
Run it by hand when you want today’s or this week’s total; turning the reports into weekly charts is covered in how I calculate weekly usage with ccusage. A few things to keep in mind:
- Upgrade to version 20.
npm install -g ccusage@latest. On the same 11 GB of transcripts,ccusage dailywent from 61.8 to 4.0 seconds and peak memory from 2.7 GB to 1.6 GB. - Version 20 counts other AI tools by default. It also reads Codex and similar tools, so the totals are higher than Claude Code alone. For Claude Code only, use
ccusage claude dailyandccusage claude weekly; the JSON fields are the same as before. --sincesaves time, not memory. For the last 7 days, version 20 went from 4.0 to 2.5 seconds, while peak memory was 2.1 GB.- If you run it often, call the installed
ccusageinstead ofnpxeach time, and skip--no-offline. The first makes npm resolve the package on every run; the second fetches prices over the network on every run. - You can keep fewer days of transcripts, but your reports shrink too.
cleanupPeriodDaysin~/.claude/settings.jsonsets how many days Claude Code keeps transcripts7; I use 14. Export long-term weekly data first withccusage claude weekly --json. - Multiple accounts are added together. ccusage groups by date, model and project, with no per-account option, so if you switch accounts often you see the combined total. The 5h and 7d figures in the status line belong to the account currently signed in.
Sources
Kelvin Wang
Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.
More about me