Logs
Log retrieval is part of the WebSocket protocol, not a REST endpoint.
Use the get_logs command on /ws.
Command request
Envelope:
{
"type": "command",
"id": "cmd-123",
"name": "get_logs",
"payload": {
"service": "api",
"after_seq": 120,
"limit": 200
}
}
payload fields:
service(string, optional): filter by service nameafter_seq(integer, optional): only return entries withseq > after_seqlimit(integer, optional): explicit max entries (> 0)
Command response (result.data)
{
"entries": [
{
"seq": 121,
"service": "api",
"phase": "running",
"stream": "stdout",
"message": "ready",
"timestamp": "2026-04-18T10:30:00Z"
}
],
"truncated": false,
"effective_limit": 200
}
Core response fields:
entries: ordered log entriestruncated: whether older entries were dropped to fit the limiteffective_limit: actual limit applied by the server
Limit resolution
Priority order:
- explicit
limitin the command payload - scope-specific server policy
- global server policy
- fallback
500
Scope-specific policy details:
- all-services request (no
service):logView.all.maxEntriesthenlogView.maxEntries - service request (
serviceset):services.<name>.logView.maxEntriesthenlogView.maxEntries
Clients should trust effective_limit from each response as the source of truth.
Streaming vs reliable continuity
Live log events are broadcast best-effort and can be dropped under pressure.
For reliable continuity:
- track the highest seen
seq - call
get_logswithafter_seq - merge by
seq
This is the canonical recovery path after reconnects or event loss.
Disk projection when logs.dir is set
If server config sets logs.dir, runtime projects logs to JSONL files:
all.jsonl(all services)<service>.jsonl(per service)
Disk projection is best-effort; runtime memory and live protocol stream remain the authoritative session behavior.