Poll a background run's output
sh_logsRead output and status of a background command by its run ID. Supports incremental polling with cursors to get only new output since last call.
Instructions
Read the output of a background run started with sh_run background:true, by id. Returns a QUIET, condensed view of stdout/stderr plus status (running/exited/killed), exit code, and running_ms. Pass back stdout_cursor/stderr_cursor (the values returned by the previous call) to get ONLY new output since last poll — ideal for tailing a dev server. A live process reads from its in-memory buffer; once it exits the SAME id resolves to the durable record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The background run id returned by sh_run (e.g. cmd7). | |
| full | No | If true, return full output inline (skip condensing). | |
| stream | No | Which stream(s) to return. | both |
| stderr_cursor | No | stderr byte cursor from a previous sh_logs call; returns only stderr since then. | |
| stdout_cursor | No | stdout byte cursor from a previous sh_logs call; returns only stdout since then. |