Skip to content

Monitor usage and set limits

See what your agents consume as you run them in parallel. On supported Linux systems, you can also limit how much of your machine each workspace uses.

Terminal window
coco status -r
coco status -afr

-r adds resource measurements, -a includes all repositories, and -f keeps the display updated. For one workspace:

Terminal window
coco status fix/login -fr

Memory shows current use, CPU shows recent usage, and PROCS counts processes. Measurements are available on Linux. For the precise meaning of each measurement, see Resource accounting.

Terminal window
coco status -u
coco status fix/login -fu
coco status -afu

-u adds total tokens, context-window use, and a cost estimate when Codex provides one. Select one workspace for the token breakdown. Combine it with -r when you want model and machine usage in the same view:

Terminal window
coco status fix/login -fru

For a larger workspace set, add -t to keep slash-separated names together in a tree. For example, coco status -aftru follows resources and model usage across repository and workspace groups.

A dash means the value is unavailable. A cost dash does not mean the work was free. After a coordinator restart, saved token values are marked last seen until Codex reports an update.

Terminal window
coco status -q
coco status -afq

-q adds the remaining limits for your active Codex account, such as the five-hour and weekly windows. The quota applies across your conversations, so CoCo prints it once rather than beside every workspace. -f keeps it updated, and -a can show all workspaces in the same view.

Account quota and workspace token usage answer different questions. Combine -q with -u when you want both:

Terminal window
coco status fix/login -fqu

If the current Codex login cannot provide account limits, status remains available and shows the quota as unavailable.

Limits are off by default. They require Linux with cgroup v2 and a compatible systemd user session. Check your workspace’s support with:

Terminal window
coco limits show fix/login

For example, start slowing memory allocation above 2 GiB and cap total CPU usage at two logical cores:

Terminal window
coco limits set fix/login --memory-high 2GiB --cpu-max 2

You can also set a hard memory ceiling and a combined process/thread limit:

Terminal window
coco limits set fix/login --memory-max 4GiB --tasks-max 512

Choose values appropriate to your project. Reaching a hard memory ceiling can terminate workspace processes; --memory-high is a gentler first control. CoCo rejects limits it cannot enforce on your system.

Terminal window
coco limits set fix/login --cpu-max 1.5
coco limits set fix/login --clear memory-max
coco limits reset fix/login

Most changes apply immediately. Removing an active CPU cap takes effect when that workspace’s execution next starts; limits show displays any pending change. A hard memory limit below current use is rejected.

See the CLI reference for all settings, including relative CPU priority, and Resource accounting for measurement and token details.