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.
Watch CPU and memory
Section titled “Watch CPU and memory”coco status -rcoco status -afr-r adds resource measurements, -a includes all repositories, and
-f keeps the display updated. For one workspace:
coco status fix/login -frMemory 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.
Watch tokens and cost
Section titled “Watch tokens and cost”coco status -ucoco status fix/login -fucoco 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:
coco status fix/login -fruFor 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.
Check your Codex quota
Section titled “Check your Codex quota”coco status -qcoco 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:
coco status fix/login -fquIf the current Codex login cannot provide account limits, status remains available and shows the quota as unavailable.
Set workspace limits
Section titled “Set workspace limits”Limits are off by default. They require Linux with cgroup v2 and a compatible systemd user session. Check your workspace’s support with:
coco limits show fix/loginFor example, start slowing memory allocation above 2 GiB and cap total CPU usage at two logical cores:
coco limits set fix/login --memory-high 2GiB --cpu-max 2You can also set a hard memory ceiling and a combined process/thread limit:
coco limits set fix/login --memory-max 4GiB --tasks-max 512Choose 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.
Change or remove limits
Section titled “Change or remove limits”coco limits set fix/login --cpu-max 1.5coco limits set fix/login --clear memory-maxcoco limits reset fix/loginMost 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.