Skip to main content
Sandbox process logs give you a searchable history of the output produced by processes in a sandbox. Use them when you need to debug a long-running agent, inspect a failed setup command, compare logs across process restarts, or share what happened in a sandbox with your team. Process logs are different from the per-process output APIs in Commands & Processes:
  • Process logs are retained telemetry for the sandbox. They are best for browsing, filtering, searching, and debugging after the fact.
  • Process output is the buffered stdout, stderr, or combined stream for one tracked process. It is best when your application needs to programmatically wait for or stream a specific process.

Open Process Logs

  1. Open the Tensorlake Console.
  2. Go to your project.
  3. Open Sandboxes.
  4. Select the sandbox you want to inspect.
  5. Open the Logs tab.
The Logs tab shows output from sandbox processes as rows with timestamps, log levels, process context, and the log message. New logs appear automatically while live refresh is enabled.
Logs appear after a process writes to stdout or stderr and the log pipeline has ingested the output. Very recent output can take a short moment to show up in the Console.

Filter Logs

Use the left sidebar or the search bar to narrow the log stream. Common filters: The process filter uses the stable processId shown by the sandbox process log metadata, not necessarily the operating-system PID. This matters for managed or restarted processes, where a logical process can restart with a new PID while keeping a stable process identifier for log filtering.

Structured JSON Logs

You can write structured logs by printing one JSON object per line to stdout or stderr. Tensorlake parses JSON log lines, extracts a display message, and stores the remaining JSON fields as structured log attributes. Use this pattern when you want logs that are still readable in the Console, but also carry machine-readable context such as job IDs, tool names, retry counts, model names, durations, or application-specific status.
For the log above:
  • message becomes the log message shown in the Console and returned as body.
  • level sets the log severity when it is one of trace, debug, info, warn, or error.
  • timestamp sets the log timestamp when it is parseable.
  • Other JSON keys are preserved in logAttributes on the returned log record.
  • Nested objects and arrays are preserved as structured attributes. null values are omitted.
If there is no message, Tensorlake uses event as the display message when it is present. Event names with underscores are shown with spaces, so "event": "tool_call_started" appears as tool call started.
Malformed JSON is treated as plain text. To make sure a line is parsed as structured data, emit exactly one complete JSON object per line. You can inspect structured attributes from the SDK responses:
Today, sandbox log search filters by log level, stable process ID, and text in the extracted body. Structured attributes are returned with each log record for inspection and downstream processing, but they are not yet separate sandbox log query filters.

CLI

Use tl sbx logs to read retained process logs from a sandbox.
By default, the CLI prints only each log message body. Add --json when you need timestamps, levels, resource attributes, pagination tokens, or other metadata:
To find stable process IDs for filtering, list the available log streams:
Then pass one or more process IDs back to tl sbx logs:
If the JSON response includes nextToken, pass it to read the next page:

Python SDK

Use Sandbox.get_logs() when you already have a sandbox object.
Filter by retained process stream:
Search message text and paginate:
If you are using SandboxClient directly, pass the sandbox ID:

TypeScript SDK

Use sandbox.getLogs() when you already have a sandbox object.
Filter by retained process stream:
Search message text and paginate:

Debug a Failed Process

A typical debugging flow is:
  1. Open the sandbox and go to Processes to find the command, status, PID, and exit code.
  2. Go to Logs.
  3. Select the matching process in the sidebar.
  4. Add a text search such as "Traceback", "error", or the package, file, or command you were investigating.
  5. Open a log row to inspect the full message and resource attributes.
For one-off commands, you can also use the SDK or process API to read stdout and stderr directly:
Use the Console Logs tab when you want to keep searching after the command has finished, filter across many processes, or inspect output from a process that was started outside your current SDK call.

Query Logs with HTTP

The Console uses the sandbox logs endpoint behind the scenes. You can query the same retained logs over HTTP:
Filter by level:
Filter by process:
Search message text:
Log levels are numeric in the HTTP API: 1 trace, 2 debug, 3 info, 4 warn, 5 error, and 6 fatal.

List Process Filter Values

To build your own process picker, list the processes that have retained logs for a sandbox:
The response includes stable process IDs, the last observed PID, command, managed process ID or name when available, first and last observed log times, and the retained log count.
Use the returned processId with the processId logs query parameter.

When Logs Are Empty

If the Logs tab is empty:
  • Confirm the sandbox has started a process that writes to stdout or stderr.
  • Check that you are viewing the correct project and sandbox ID.
  • Wait a short moment for ingestion if the process just wrote output.
  • Use the Processes tab or the process output API if you need immediate output from a currently running process.
Logs are retained according to the log retention policy for your environment.