logs

A command for printing the retained output from a recorded Crabbox run, where Crabbox runs commands on managed machines. It can show all retained output, a tail, or JSON data.

In plain words
What is it for?
Use it to review a run’s standard output and error messages, check whether output was truncated, or retrieve machine-readable logs.
Why use it?
It lets you inspect what a previous run printed without rerunning the command.

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/logs
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 830 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.00830
Opus 5 $0.00000 $0.00415
Sonnet 5 $0.00000 $0.00166
Haiku 4.5 $0.00000 $0.00083

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

Security

Grade A, and why

logs 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/logs.md · 98 lines

How it starts

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

logs

crabbox logs prints the retained command output for a recorded run.

crabbox logs run_abcdef123456
crabbox logs --id run_abcdef123456
crabbox logs run_abcdef123456 --tail 80
crabbox logs run_abcdef123456 --json

Run IDs have the form run_<hex>. Get them from history, or from the run.started event in events.

What gets stored

When crabbox run executes against a coordinator, it streams the remote process stdout and stderr to your terminal and records a bounded copy on the coordinator. The retained log is the combined command output, capped at 8 MiB per run; the coordinator stores it in 64 KiB chunks so a noisy parallel run does not blow past Durable Object storage limits.

Output beyond the cap is dropped and the run is flagged as truncated, so a consumer can tell the tail is missing.

Runs started with run --capture-stdout <path> intentionally omit stdout from the retained log and from output events; stderr is still streamed and retained. Use that mode for binary stdout, Sixel frames, archives, or anything that should not be stored as text on the coordinator. Files pulled with run --download remote=local are local artifacts and never appear in coordinator logs.

Output

The default form writes the log text to stdout, unmodified. Add --tail N to print only the last N lines of the retained log.

Logs are stored as combined output; stdout and stderr are not separately indexed in the retained log, so per-stream filtering belongs on events instead.

--json prints the full run record alongside the log:

{
  "run": {
    "id": "run_abcdef123456",
    "leaseID": "cbx_abcdef123456",
    "state": "succeeded",
    "exitCode": 0,
    "logBytes": 4096,
    "logTruncated": false
  },
  "log": "..."
}

The run object carries the same fields you get from history (provider, target, timings, exitCode, logBytes, logTruncated, parsed results, and more); the log field holds the retained text after any --tail trim. Scripts that want exit code plus log text in one payload should read run.exitCode and log.

Read the full file on GitHub · 98 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. 2d ago First seen · 98 lines · 0 tokens per session scan A c9fd94954c3c

Subscribe to this mod's changes

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