capacity

capacity is a command for coding agents from openclaw/crabbox. It costs 0 tokens per session (741 once invoked), scanned A, original, MIT.

A command that shows the authenticated owner's current active admission count and effective limit from a coordinator service.

In plain words
What is it for?
Checking how many leases an owner is using and what limit applies to that owner.
Why use it?
It lets you check available capacity before starting work. The result is only a snapshot, not permission to reserve or allocate resources.

Command

About the project

Crabbox is a remote execution control plane that lets a local command run on managed cloud capacity, an SSH host, or another delegated sandbox while syncing code, streaming output, and recording evidence. It is for maintainers, contributors, teams, AI agents, and automation that need repeatable remote testing, builds, browser checks, or platform-specific validation. The catalogue add-ons provide commands and instructions for controlling Crabbox runs.

openclaw/crabbox · 1,368 stars · on GitHub · crabbox.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/crabbox/capacity
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for capacity

README.md
[![agentmods](https://agentmods.dev/badge/commands/openclaw/crabbox/capacity.svg)](https://agentmods.dev/commands/openclaw/crabbox/capacity)
Your own site
<a href="https://agentmods.dev/commands/openclaw/crabbox/capacity"><img src="https://agentmods.dev/badge/commands/openclaw/crabbox/capacity.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00741
Opus 5 $0.00000 $0.00370
Sonnet 5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

Measured 2d ago against content hash 4db49b97b523, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

capacity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/capacity.md · 73 lines

What it actually says

capacity

crabbox capacity [--json] reports the authenticated owner's current admission count and effective owner limit. It requires a configured coordinator and uses the normal coordinator credentials, including the existing resolved shared or unknown owner identity. It never falls back to a direct provider or local lease list. Older coordinators without GET /v1/capacity return an unsupported error.

crabbox capacity
crabbox capacity --json

The only option is --json (plus --help). There are no positional arguments or owner, user, org, month, or scope selectors. Even admin requests report only the owner resolved by normal authentication. The API rejects every query parameter with HTTP 400.

self-owner admission count: owner=github:12345 activeLeases=10
effective owner limit: 10
observed at: 2026-09-02T12:00:00.000Z
Snapshot only; not a reservation or approval to allocate.

JSON contains exactly four fields:

{
  "owner": "github:12345",
  "activeLeases": 10,
  "effectiveLimit": 10,
  "observedAt": "2026-09-02T12:00:00.000Z"
}

effectiveLimit: 0 means the selected owner limit is off; text prints off. The selected limit uses the existing capacity-owner policy, independently of admin authentication. A positive elevated limit for a configured member selects the larger of ordinary and elevated limits, including when the ordinary limit is zero. The response does not expose membership or the underlying limit config.

activeLeases counts existing admission entries only, with no candidate added. At ten existing leases and a limit of ten, the diagnostic succeeds with 10; an attempted new allocation would instead be checked as 11/10. Successful diagnostics exit 0 even at or above the cap. Invalid syntax/configuration and request errors follow normal CLI error handling; errors go to stderr and data go to stdout. Malformed successful responses fail instead of displaying zeros.

Unlike monthly usage, the count spans every creation month and org for the exact, case-sensitive owner identity. Active and provisioning managed leases count even after their canonical expiry, until a terminal state is committed. Released, expired, failed, and registered inventory records do not count. A live, unexpired admission reservation overrides its canonical lease by ID and counts once; reservation-only IDs count too. Stale reservations are ignored without cleanup, with canonical records used when present. Shared leases owned by someone else and direct-only leases absent from the coordinator do not count.

This read-only snapshot uses the same serialized boundary as admission on Cloudflare and Node. Normal service startup and background recovery retain their existing behavior; the capacity handler itself neither allocates nor reconciles resources, deletes stale records, schedules maintenance, nor calls providers. It reveals no lease IDs, records, org/provider breakdowns, costs, or other owners' counts. The aggregate is a narrow exception to owner/org visibility, not expanded access to lease records or monthly reports.

The snapshot is not a reservation or approval to allocate. Fleet, org, budget, and provider gates may still reject allocation, and the count can change after observedAt. See cost and usage and auth and routing.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 73 lines · 0 tokens per session scan A 4db49b97b523

Subscribe to this mod's changes

capacity is a command published in the GitHub repository openclaw/crabbox (1,368 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 741 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.