prewarm

A command for reserving and preparing a reusable Crabbox machine before test runs. It can hydrate configured GitHub Actions dependencies, run an optional readiness check, and keep the machine running.

In plain words
What is it for?
Use it before test runs to warm a machine, check that tools such as Node.js or pnpm are available, inspect a dry-run plan, or register a ready machine pool.
Why use it?
It prepares a machine in advance so a burst of tests does not have to wait for first-use setup.

Command

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/prewarm
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox
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 1,181 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 $0.00000 $0.01181
Opus 5 $0.00000 $0.00590
Sonnet 5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

Measured 3d ago against content hash 9987875d9ebd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prewarm 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 3d 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/prewarm.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

prewarm

crabbox prewarm leases a reusable box and prepares it for test runs. For SSH-backed providers it runs the same configured GitHub Actions hydration that crabbox run would otherwise do on first use; for delegated providers such as Blacksmith Testbox, hydration stays provider-owned.

crabbox prewarm
crabbox prewarm --provider azure --probe-command 'node -v && pnpm -v'
crabbox prewarm --pool example/app/main/linux --pool-compatibility-key linux-16-vcpu
crabbox prewarm --provider aws --pool example/app/main/linux --pool-cache-compatibility node-22-pnpm-10
crabbox prewarm --dry-run

The command prints the lease id and keeps the box running. Stop it with crabbox stop <id> when the test burst is done.

If Actions hydration, the optional probe, or ready-pool registration fails, prewarm automatically releases a newly created SSH lease. If automatic release cannot resolve or stop the lease, the error output prints the exact crabbox stop command to run; delegated-run providers retain their provider-owned lifecycle behavior.

Before configuring a backend, warming a box, checking typed ready-pool support, or printing a dry-run plan, prewarm validates the generated probe against the selected provider's run contract. The probe reuses the planned lease with --no-sync --no-hydrate --shell; unsupported probes fail with exit code 2 before warmup. This admission does not resolve a lease or inspect prior claims.

Prewarm also validates the provider configuration that hydration and probes will reload. Creation-only flags stay on warmup and are not forwarded to either follow-up. If a creation override hides an invalid saved value, fix that saved configuration before requesting hydration or a probe; prewarm rejects the invalid follow-up before allocation, including with --dry-run. Plain prewarm without hydration or a probe keeps its normal creation override behavior.

Reuse

Run follow-up commands against the printed lease id or slug:

crabbox run --id <id-or-slug> --no-sync -- pnpm test
crabbox run --id <id-or-slug> -- pnpm test

Read the full file on GitHub · 110 lines

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. 3d ago First seen · 110 lines · 0 tokens per session scan A 9987875d9ebd

Subscribe to this mod's changes

prewarm is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,181 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-08-30.