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.
- 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,swapwhen it swapped a secret in,tls_failed,upstream_error), the host, andwith NAMEfor a swap. Blocked requests showblocked, the host and the reason. - metrics: one line per second with CPU, memory and network bytes. Off by default because it is long.
(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.
nothing recorded in this window (a stopped sandbox records nothing).
From an agent
The MCP server hassandbox_logs (the same lines, at most the newest 400) and sandbox_stats (the same numbers as JSON).