OpenShell provides three ways to access sandbox logs: the CLI, the TUI, and direct filesystem access inside the sandbox.
Use openshell logs to stream logs from a running sandbox:
The CLI receives logs from the gateway over gRPC. Each line includes a timestamp, source, level, and message:
OCSF structured events show OCSF as the level. Standard tracing events show INFO, WARN, or ERROR.
Gateway-originated policy mutations also appear in this stream. When the gateway merges openshell policy update operations or approves or removes draft policy chunks, it emits gateway OCSF CONFIG:* lines for the affected sandbox so you can see the exact logical change that produced a new policy revision.
The TUI dashboard displays sandbox logs in real time. Logs appear in the log panel with the same format as the CLI.
The sandbox pushes logs to the gateway over gRPC in real time. The gateway stores a bounded buffer of recent log lines per sandbox. This buffer is not persisted to disk and is lost when the gateway restarts.
For durable log storage, use the log files inside the sandbox or enable OCSF JSON export and ship the JSONL files to an external log aggregator.
Use openshell sandbox connect to open a shell inside the sandbox and read the log files directly:
You can also run a one-off command without an interactive shell:
The log files inside the sandbox contain the complete record, including events that the gRPC push channel can drop under load. The push channel is bounded and drops events rather than blocking.
The shorthand format is designed for grep. Some useful patterns: