Claude Code mod: status line with the session's memory, CPU and uptime
TypeScript
4
59 commits
updated Oct 11, 2026
A Claude Code mod that pins a status line with the session's own resource use, and opens a task-manager pane of it on /proc-stats:

mem 484MB · peak 530MB · cpu 2.4% · up 12m 4s
While the session has processes running under it (Bash commands, watchers, test runs, local MCP servers), or ones it started that have since detached, their share is added after a +:
mem (484 + 215)MB · peak 530MB · cpu (2.4 + 98.7)% · up 12m 4s
ps has no peak, it is the highest seen since the mod loaded.top shows it./proc-stats opens a task-manager pane and gives it the keyboard (Esc hands it back to the prompt; click the pane or press ctrl+x then tab to return):
max). Memory is scaled from the window's lowest to its highest point, and never to less than 64 MB or a tenth of its highest point (whichever is more), so a slow leak rises across the full height while small noise stays flat and a steady line sits mid-height; CPU is scaled from zero to one core, or to its highest point when that is more. Short spikes stay visible. Readings are drawn evenly spaced, so a gap (such as while the machine sleeps) does not show.$ <command>; a $ … row also says what started it when it can tell — · Bash, · Monitor, · subagent: <type>, or · agent for one it cannot name — and the details name the subagent's task (commands started before the mod loaded show none); ▾/▸ marks a row with processes under it. Under the rows, Child processes sums every process below Claude Code, and Total adds the detached ones and Claude Code's own.nohup … &, setsid, daemons) follow the tree under a Detached heading, with their own subtotal. They count toward the totals, the history, the status-line marker and the toasts, and can be stopped like any other row. In a sorted view their parent reads detached. The mod finds them by a variable, PROC_STATS_SESSION, that it sets for every command the session starts; if it cannot set it, a line under the rows says detached processes are not tracked.taskkill /T), and after 3 seconds offers f Force stop (SIGKILL) if anything is still running, even a process that left the tree when its parent ended. Once a stop is sent the footer offers n Dismiss. Claude Code's own row cannot be stopped.
$ … row that Claude is still running ends that tool call.taskkill without /F cannot end console processes.TIME, then PID, give way on a narrow pane.
/proc-stats report writes a summary of the session into the conversation, where Claude reads it too: the platform and how long Claude Code has run; the memory and CPU of Claude Code, its child processes, its detached processes and all of them together now; the highest memory and CPU of the history window and how long ago they were; the five processes using the most memory, with what started them; up to ten detached processes; the marker level; and the last five alerts.
By default both views refresh every second on Linux, every 2 seconds on macOS and every 5 on Windows (configurable in Settings), and work on Linux (/proc and ps), macOS (ps) and Windows (PowerShell). Detached processes are found on Linux (/proc/<pid>/environ, read once per process) and macOS (ps eww, at most every 10 seconds, so a new one can take that long to show), and not on Windows.
In Claude Code's config menu (/config), under proc-stats:
| Setting | Default | |
|---|---|---|
| Refresh on Linux / macOS / Windows (ms) | 1000 / 2000 / 5000 | how often processes are read; 250-60000 on Linux and macOS, 1000-60000 on Windows |
| Memory warning / alert (MB) | 2048 / 4096 | 🟡 / 🔴 on the status line (session total); a warning above its alert is lowered to the alert; limits are at least 1 |
| CPU warning / alert (%) | 150 / 300 | the same for CPU, averaged over the last 10 s (two refreshes when the refresh is slower) |
| Busy process CPU (%) / time (s) | 90 / 60 | a toast for one process the session started |
| Large process memory (MB) | 1024 | a toast for one process the session started |
| History (minutes) | 10 | the pane's sparklines; 1-120 minutes |
| Child processes on the status line | on | the + part |
A value out of range is ignored and its default used.
At the prompt of a Claude Code terminal session:
/plugin install proc-stats --marketplace DragosMocrii/proc-stats
Answer y to add the marketplace, then choose a scope (user scope loads it in every session).
env -i, is not found), and only on Linux and macOS.xdg-open or code ., carries the session's mark and is counted as a detached process.+ ? means the process table could not be read (for example no ps in a minimal container).Does it add much overhead?
Little. Each reading runs ps once. On Linux it also reads a few small /proc files for Claude Code and for each process under it, and reads a new process's environment once. A reading that is due while the last one is still running is skipped, so readings never pile up. With 36 processes running, one ps call takes about 5 ms. Windows costs more because every reading starts PowerShell, so it reads every 5 seconds by default. The mod only reads: it attaches to no process, does not slow any process down, and sends nothing over the network. It runs inside Claude Code, so its own memory and CPU show in Claude Code's row. It keeps at most 2,400 history points and 500 rows. For a lighter load, raise the refresh in Settings.
Is it configurable?
Yes, in /config under proc-stats. You can set how often each platform is read, the memory and CPU limits for the 🟡 / 🔴 markers and the toasts, how far back the history goes, and whether the status line shows the + part for child processes. See Settings.
Can I resize the pane? Yes. Claude Code places the pane and sizes it, not the mod. In the fullscreen layout at 110 columns or more, it docks beside the conversation; otherwise it sits above the prompt. You can drag it to another size, and Claude Code keeps the size you set. When the pane is narrow, the TIME column is hidden first, then PID.
Why is CPU above 100%?
CPU is a share of one core, as in top, so 250% means two and a half cores are busy.
Does it see my other sessions and terminals? No. It sees Claude Code, the processes under it, and detached processes that carry this session's mark. Each session gets its own mark, so another session's processes are not counted.
What is PROC_STATS_SESSION in my environment?
It is this session's mark, a random ID that the mod sets for every command the session starts. The mod uses it to find processes that have detached. It holds nothing else.
Can it stop a process by mistake? No. It stops a process only when you press k on its row in the pane and then confirm with y. Claude Code's own row cannot be stopped.
claude plugin validate .
claude plugin test .
claude --plugin-dir .
docs/demo.gif is recorded by docs/demo, a Go module that runs Claude Code with the mod in a pseudo-terminal, in a made-up project whose stand-in processes hold memory and CPU, and draws the screen to a GIF. It runs on Linux, logged in to Claude Code (its one prompt uses your account), in a home and config directory of its own; see the comment at the top of docs/demo/main.go for the fonts it needs. Re-record it after visible changes:
cd docs/demo
go run . -font DejaVuSansMono.ttf -bold DejaVuSansMono-Bold.ttf \
-fallback DejaVuSans.ttf,NotoSansSymbols2-Regular.ttf,NotoSansSymbols.ttf -emoji noto-emoji/2D/png/72
Claude Code mod: status line with the session's memory, CPU and uptime
TypeScript
4
59 commits
updated Oct 11, 2026
A Claude Code mod that pins a status line with the session's own resource use, and opens a task-manager pane of it on /proc-stats:

mem 484MB · peak 530MB · cpu 2.4% · up 12m 4s
While the session has processes running under it (Bash commands, watchers, test runs, local MCP servers), or ones it started that have since detached, their share is added after a +:
mem (484 + 215)MB · peak 530MB · cpu (2.4 + 98.7)% · up 12m 4s
ps has no peak, it is the highest seen since the mod loaded.top shows it./proc-stats opens a task-manager pane and gives it the keyboard (Esc hands it back to the prompt; click the pane or press ctrl+x then tab to return):
max). Memory is scaled from the window's lowest to its highest point, and never to less than 64 MB or a tenth of its highest point (whichever is more), so a slow leak rises across the full height while small noise stays flat and a steady line sits mid-height; CPU is scaled from zero to one core, or to its highest point when that is more. Short spikes stay visible. Readings are drawn evenly spaced, so a gap (such as while the machine sleeps) does not show.$ <command>; a $ … row also says what started it when it can tell — · Bash, · Monitor, · subagent: <type>, or · agent for one it cannot name — and the details name the subagent's task (commands started before the mod loaded show none); ▾/▸ marks a row with processes under it. Under the rows, Child processes sums every process below Claude Code, and Total adds the detached ones and Claude Code's own.nohup … &, setsid, daemons) follow the tree under a Detached heading, with their own subtotal. They count toward the totals, the history, the status-line marker and the toasts, and can be stopped like any other row. In a sorted view their parent reads detached. The mod finds them by a variable, PROC_STATS_SESSION, that it sets for every command the session starts; if it cannot set it, a line under the rows says detached processes are not tracked.taskkill /T), and after 3 seconds offers f Force stop (SIGKILL) if anything is still running, even a process that left the tree when its parent ended. Once a stop is sent the footer offers n Dismiss. Claude Code's own row cannot be stopped.
$ … row that Claude is still running ends that tool call.taskkill without /F cannot end console processes.TIME, then PID, give way on a narrow pane.
/proc-stats report writes a summary of the session into the conversation, where Claude reads it too: the platform and how long Claude Code has run; the memory and CPU of Claude Code, its child processes, its detached processes and all of them together now; the highest memory and CPU of the history window and how long ago they were; the five processes using the most memory, with what started them; up to ten detached processes; the marker level; and the last five alerts.
By default both views refresh every second on Linux, every 2 seconds on macOS and every 5 on Windows (configurable in Settings), and work on Linux (/proc and ps), macOS (ps) and Windows (PowerShell). Detached processes are found on Linux (/proc/<pid>/environ, read once per process) and macOS (ps eww, at most every 10 seconds, so a new one can take that long to show), and not on Windows.
In Claude Code's config menu (/config), under proc-stats:
| Setting | Default | |
|---|---|---|
| Refresh on Linux / macOS / Windows (ms) | 1000 / 2000 / 5000 | how often processes are read; 250-60000 on Linux and macOS, 1000-60000 on Windows |
| Memory warning / alert (MB) | 2048 / 4096 | 🟡 / 🔴 on the status line (session total); a warning above its alert is lowered to the alert; limits are at least 1 |
| CPU warning / alert (%) | 150 / 300 | the same for CPU, averaged over the last 10 s (two refreshes when the refresh is slower) |
| Busy process CPU (%) / time (s) | 90 / 60 | a toast for one process the session started |
| Large process memory (MB) | 1024 | a toast for one process the session started |
| History (minutes) | 10 | the pane's sparklines; 1-120 minutes |
| Child processes on the status line | on | the + part |
A value out of range is ignored and its default used.
At the prompt of a Claude Code terminal session:
/plugin install proc-stats --marketplace DragosMocrii/proc-stats
Answer y to add the marketplace, then choose a scope (user scope loads it in every session).
env -i, is not found), and only on Linux and macOS.xdg-open or code ., carries the session's mark and is counted as a detached process.+ ? means the process table could not be read (for example no ps in a minimal container).Does it add much overhead?
Little. Each reading runs ps once. On Linux it also reads a few small /proc files for Claude Code and for each process under it, and reads a new process's environment once. A reading that is due while the last one is still running is skipped, so readings never pile up. With 36 processes running, one ps call takes about 5 ms. Windows costs more because every reading starts PowerShell, so it reads every 5 seconds by default. The mod only reads: it attaches to no process, does not slow any process down, and sends nothing over the network. It runs inside Claude Code, so its own memory and CPU show in Claude Code's row. It keeps at most 2,400 history points and 500 rows. For a lighter load, raise the refresh in Settings.
Is it configurable?
Yes, in /config under proc-stats. You can set how often each platform is read, the memory and CPU limits for the 🟡 / 🔴 markers and the toasts, how far back the history goes, and whether the status line shows the + part for child processes. See Settings.
Can I resize the pane? Yes. Claude Code places the pane and sizes it, not the mod. In the fullscreen layout at 110 columns or more, it docks beside the conversation; otherwise it sits above the prompt. You can drag it to another size, and Claude Code keeps the size you set. When the pane is narrow, the TIME column is hidden first, then PID.
Why is CPU above 100%?
CPU is a share of one core, as in top, so 250% means two and a half cores are busy.
Does it see my other sessions and terminals? No. It sees Claude Code, the processes under it, and detached processes that carry this session's mark. Each session gets its own mark, so another session's processes are not counted.
What is PROC_STATS_SESSION in my environment?
It is this session's mark, a random ID that the mod sets for every command the session starts. The mod uses it to find processes that have detached. It holds nothing else.
Can it stop a process by mistake? No. It stops a process only when you press k on its row in the pane and then confirm with y. Claude Code's own row cannot be stopped.
claude plugin validate .
claude plugin test .
claude --plugin-dir .
docs/demo.gif is recorded by docs/demo, a Go module that runs Claude Code with the mod in a pseudo-terminal, in a made-up project whose stand-in processes hold memory and CPU, and draws the screen to a GIF. It runs on Linux, logged in to Claude Code (its one prompt uses your account), in a home and config directory of its own; see the comment at the top of docs/demo/main.go for the fonts it needs. Re-record it after visible changes:
cd docs/demo
go run . -font DejaVuSansMono.ttf -bold DejaVuSansMono-Bold.ttf \
-fallback DejaVuSans.ttf,NotoSansSymbols2-Regular.ttf,NotoSansSymbols.ttf -emoji noto-emoji/2D/png/72