Skip to main content
Every sandbox has a flight recorder. zode logs prints its entries and zode stats sums up a window. Both read the same data as the console’s Activity and Metrics tabs and the timeline API. How long entries are kept depends on your plan: 7, 30 or 90 days.

zode logs

Put the flags after the sandbox name. zode log works too.
What each track shows:
  • process: the command, how it ended (exit code and run time, running, or killed for running out of memory), its pid and peak memory. A sealed command shows as [sealed].
  • ai: provider and model, input tokens (and how many were cached), output tokens, cost, latency and HTTP status.
  • net: what the egress proxy did with a web request (passthrough, intercept, swap when it swapped a secret in, tls_failed, upstream_error), the host, and with NAME for a swap. Blocked requests show blocked, the host and the reason.
  • metrics: one line per second with CPU, memory and network bytes. Off by default because it is long.
Lines the sandbox reported about itself, rather than the host, end with (reported by the sandbox). Process lines come from the sandbox today. Treat them as untrusted. With nothing in the window, it prints nothing recorded for demo since Nov 14 08:43 (tracks: process,ai,net).

zode stats

--since works as for zode logs. --json prints the API’s answer as is.
Lines with nothing to say are left out. A window with no samples prints nothing recorded in this window (a stopped sandbox records nothing).

From an agent

The MCP server has sandbox_logs (the same lines, at most the newest 400) and sandbox_stats (the same numbers as JSON).