Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or requestfeature requestsNew feature, or a change that requires an API spec (proto) changeNew feature, or a change that requires an API spec (proto) changemodel:opusRoute to Opus — standard multi-file feature workRoute to Opus — standard multi-file feature workneeds-verificationCannot be proven by CI — verify against a deployed environmentCannot be proven by CI — verify against a deployed environmentruntime:claudeWork runs under the Claude Code CLI (default)Work runs under the Claude Code CLI (default)size:LAgent build time ~4h-1 dayAgent build time ~4h-1 day
Description
Problem
To read what is running on a box, a user has to open a shell in it and run journalctl, docker logs or podman logs by hand. No daemon RPC reads the box's journal or the logs of containers running inside it. TailBoxRunLog covers only a coding-agent run.
Proposal
Add ContainerService.TailBoxLogs (GET /v1/containers/{username}/logs) that returns one window of the box's logs, merged across sources and ordered by time, plus a containarium logs <box> CLI subcommand and an MCP box_logs tool that wrap it (CLI first).
- Sources: the systemd journal (label = unit, or syslog identifier when there is no unit) and every container running in the box (docker or podman).
- Read is a window with an opaque resume cursor;
follow_seconds(0..10) long-polls likeTailBoxRunLog, so there is no server stream. - Same access rule as
TailBoxRunLog. - Collection is one fixed script exec'd in the box. Only integers, timestamps, a strictly validated journal cursor and unit names matching a strict pattern are passed; container names are compared, never executed. Output is treated as untrusted: strict frame parser, hard size limit, invalid UTF-8 replaced. The script times itself out and caps its output.
- Merge in the daemon: k-way by receipt time with a small settle margin so a late line from a slower source is not skipped.
- A stopped box is reported as such; it is not started and its disk is not read.
Acceptance criteria
- A box running one systemd unit and one container returns lines from both, labelled and time-ordered.
- Passing the returned cursor back resumes with no duplicate and no lost line across windows.
-
--since,--tail, and unit/container filters work; an unknown filter returnsInvalidArgumentlisting valid names. - A caller without access to the box gets the same error as for
TailBoxRunLog. - A hostile log line (control bytes, invalid UTF-8, a 1 MB line) cannot break parsing or exceed the window caps.
- No handler hand-rolled outside grpc-gateway; protobuf first, enums for source kind and status.
-
containarium logsand the MCP tool call the same RPC.
Open checks
- Does the exec seam work for podman-backed and rootless boxes?
- Which log driver do container runtimes default to on supported images?
Estimate: build ~1 day (size:L) + review.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeature requestsNew feature, or a change that requires an API spec (proto) changeNew feature, or a change that requires an API spec (proto) changemodel:opusRoute to Opus — standard multi-file feature workRoute to Opus — standard multi-file feature workneeds-verificationCannot be proven by CI — verify against a deployed environmentCannot be proven by CI — verify against a deployed environmentruntime:claudeWork runs under the Claude Code CLI (default)Work runs under the Claude Code CLI (default)size:LAgent build time ~4h-1 dayAgent build time ~4h-1 day
Activity
hsinatfootprintai commentedon Nov 11, 2026
Scoping decision: the first version supports docker-backed boxes only. Boxes on other runtimes (podman, rootless) return a typed RUNTIME_UNSUPPORTED reason instead of partial output; broader runtime support can follow as a separate issue.
hsinatfootprintai commentedon Nov 11, 2026
agent-3643a-sonnet is starting processing it
hsinatfootprintai commentedon Nov 11, 2026
agent-2254dad9-opus: taking over #3643 from agent-3643a-sonnet (no branch or PR since its claim)
hsinatfootprintai commentedon Nov 11, 2026
agent-2254dad9-opus: PR #3644 opened at 40523e9 — CI pending (https://github.com/FootprintAI/Containarium/actions/runs/43042284941). PR #3645 (stacked on #3644; closes this issue) opened at 756c390 — CI pending (https://github.com/FootprintAI/Containarium/actions/runs/43042654306).
feat(logs): containarium logs and the MCP box_logs tool over TailBoxL…
feat(logs): TailBoxLogs RPC — a box's journal and container logs in o…