PrumoGrid

HomeLearnFeaturesUsage and limits

FEATURES / 15

Usage and limits

How much CPU and memory each terminal uses, the tokens the CLIs report per session, and how to set a limit on a terminal or end an idle one.

Updated for PrumoGrid 0.5.11

What it's for

With several projects and agents open, the machine slows down and it gets hard to tell which terminal is responsible. PrumoGrid measures each terminal by adding up every process it started (the shell, the agent, an npm test the agent kicked off) and shows the result in the pane header, in the status bar and in the Usage tab. The same tab shows the tokens the CLIs report per session. When a terminal goes too far, you can set a memory and CPU limit on it or end the session.

Watch the video

VIDEO 12 · 1:00

Multiple projects, day to day. A permission from another project through Attention, the Steps filters, Usage, closing a terminal and search. Captions and transcript ↗

When to use it and when not to

Use it when the machine gets slow and you want to find the heavy terminal, when an agent leaves processes running, or to follow how many tokens a conversation has piled up before you send it one more stage.

Do not use the token numbers as a bill: they are not billing and not a per-stage cost split. And do not read no data as zero. It means the CLI did not report it, or PrumoGrid could not read it reliably.

Turn on the Usage tab

Each terminal's usage always appears in the pane header, such as 0% · 141M (CPU and memory), and the total is in the status bar, such as 3 terminals · 0% CPU · 381 MB RAM · GPU unavailable. The Usage tab in the right sidebar, with the per-terminal detail, only appears when the Tools → Rules and Usage tabs in the sidebar switch is on. It starts off. Turn it on once and the Rules and Usage tabs sit next to Attention and Stages.

Step by step

Find the heavy terminal

  1. Turn on Tools → Rules and Usage tabs in the sidebar, if it is not on yet.
  2. Select the project, for example loja-api, and click the Usage tab.
  3. Read the Usage per terminal list. The first line adds everything up; below it there is one line per terminal, with the name, CPU, memory, and disk reads and writes.
  4. Hover over a line's detail: the tooltip says how many processes go into that terminal's total.
  5. Click the line to go to the terminal in the Grid and confirm, by the name and the folder, that it is the terminal you think it is.

Set a limit on a terminal

The example limits the Codex terminal in loja-api to 4 GB of memory and half the CPU.

  1. On the terminal's line, click Limit….
  2. Fill in memory (MB) with 4096 and CPU (%) with 50. Leave a field empty to not limit that resource.
  3. Click Apply. The notice confirms the limits applied, and the line starts showing them.
  4. To remove both limits, open Limit… again and click No limits.

The same setting is in Tools → Memory and CPU limits…, which opens the section of the same name in Advanced options…. There you choose the terminal in Terminal and fill in the same fields. The limits apply only to the chosen session; changing one terminal does not change the others.

End an idle session

At the end of the day there are terminals left open. In the example, a PowerShell in pagamentos has been idle for hours.

  1. In the Usage tab, with All projects or with pagamentos selected, find the PowerShell line.
  2. Click End session and confirm. This ends the shell and every process it created, children and grandchildren.
  3. The pane stays in the grid showing the last output, and you can restart from it. To remove the pane as well, use Close pane.

Close pane on its own does something else: it takes the pane out of the grid, and the session stays alive in the terminal service. It is useful for tidying the screen without losing what is running.

Tokens by session

In the Usage tab, expand Tokens by session with the project selected. You see the input and output of the observed conversations, the project total and the sessions that make it up, including those from terminals that have already ended.

Where it comes fromWhat PrumoGrid shows
CodexThe totals from the file Codex itself writes for the conversation.
Claude CodeThe receipts identified in the conversation file. An incomplete or ambiguous read leaves the running total with no data.
Gemini and other CLIsNo total, until there is a recognized source.

Each session is counted once. When the CLI reports the conversation's identity, resuming that conversation in another terminal does not add the same usage twice. A new conversation in the same terminal is measured on its own. The totals are kept when you reopen the window.

Keep two numbers that look alike apart. The current context is how much of the context window the conversation takes up right now, like what Claude's status bar shows. The running total is everything that went in and out since the start of the conversation. A low context does not mean low accumulated usage, and vice versa.

What you see on screen

The Usage tab: each terminal with CPU, memory and the actions Limit…, End session and Close pane.
On screenWhat it means
381 MB on the terminal's lineMemory of the terminal and the processes it started, added up.
↓ and ↑Disk reads and writes per second.
GPU unavailableThe collector does not measure GPU per terminal. The absence is stated, not hidden as zero.
session with no job objectThis session does not have the Windows control that allows adding up and limiting. There is no Limit… or End session for it.
model and context: no dataThe CLI did not report the model or the context size.
at the limitPrivate memory went over 90% of the applied limit.
Limit…: memory in MB and CPU as a percentage, with Apply and No limits.

Tips

  • Before ending a session, identify the terminal by its name and folder. Clicking the line takes you to it.
  • If an agent is about to run a heavy task, such as a long test suite, limit its terminal and leave the others free.
  • With two Codex terminals in the same folder, PrumoGrid cannot tell which conversation file belongs to which, and model and context show no data. Use a worktree for the second one.
  • To see what is pending instead of what is heavy, use Attention.

Known limitations

  • Memory from 64 MB to 1,048,576 MB; CPU from 1% to 100%. The limit applies to the session, for as long as it exists.
  • PrumoGrid does not measure GPU per terminal.
  • Tokens depend on what each CLI writes. The app does not rebuild old conversations it never observed.
  • The numbers are not billing costs or a per-stage cost split.
  • The suggested memory and CPU fields of a role do not apply any limit. The limit comes only from Limit… or from Memory and CPU limits….