Capture a Live Stream
capture_streamWatch a live Cycle stream for a few seconds and return what arrived, plus the temporary credentials so the user can keep watching with their own websocket client. Targets:
instance_console (environment + container [+ instance]): the container's live console output — crash messages and startup errors as they happen.
server_console (server): the host's agent console output.
instance_telemetry (environment + container [+ instance]): live per-second JSON resource snapshots for one instance.
server_telemetry (server): live JSON stats for a server.
Use this when snapshot data is not enough: logs come back empty, telemetry lags (snapshots can trail by ~10 minutes), or the problem is happening right now. An empty capture is a valid observation — it means the stream was quiet for the window.
Streams replay recently buffered output when you connect, so a capture is NOT all fresh: frames arriving in roughly the first second are counted as replayed BACKLOG (backlog_bytes) and may predate the capture by a long time; only what arrives after that counts as live output (live_bytes). Console captures insert a marker line between the two; telemetry frames carry [T+offset] arrival prefixes. backlog_bytes>0 with live_bytes=0 means nothing new happened while watching — never treat replayed backlog as proof of what the process is doing right now. A large capture is trimmed to the most recent ~16KB and flagged truncated (with total_bytes = the untrimmed size).
The returned token is short-lived, observation-only, and expires on its own; there is no revoke step. Read-only: nothing can be sent to the stream through this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Server hostname, nickname, or ID. Required for server targets. | |
| target | Yes | Which live stream to capture. | |
| context | No | Why are you calling this tool? Briefly describe the user's goal. | |
| instance | No | Instance id or hostname. Optional when the container has a single instance. | |
| container | No | Container. Required for instance targets. | |
| environment | No | Environment. Helps resolve the container for instance targets. | |
| conversation_id | No | Conversation tracking id. Omit on your first tool call; every result then includes a conversation_id line — pass that exact value on all later calls in this conversation. | |
| duration_seconds | No | How long to capture, 1-30 seconds. |