microagent logs
Last updated: 2026-06-11
microagent logs <name> [--follow] [--state-dir <dir>]logs prints the captured serial console output for a workspace. It is useful
for boot diagnostics and for reviewing output after an interactive
connect session.
By default logs reads the full captured serial buffer once and prints it. With
--follow (-f) it prints the buffer and then streams new output as it is
appended, returning when the workspace leaves the running state or you interrupt
with Ctrl-C. With the global --json flag, the buffer is returned once as a
string under logs; --follow is not supported with JSON/AX output.
Examples
Section titled “Examples”Read the serial buffer:
microagent logs researchFollow new output as it appears:
microagent logs research --followTypical serial output begins with the guest boot log:
[ 0.000000] Linux version 6.1.0 ...[ 0.512000] Run /init as init processmicroagent: guest init startedresearch login:You’ll rarely need flags here - --follow when you’re watching a boot or a
long-running guest, --state-dir only for a non-default state directory.
| Flag | Description |
|---|---|
--follow, -f | Stream the buffer and new output until the workspace stops or you interrupt |
--state-dir <dir> | State directory holding the workspace record (default ~/.microagent/) |
See global flags for --json/--text/--output/--mode.
Exit status
Section titled “Exit status”logs exits 0 after printing the buffer (or when a --follow stream ends
normally); nonzero when the workspace cannot be found or the serial log cannot
be read. In AX mode a failure is written as a structured error envelope.
Related
Section titled “Related”connect- an interactive console instead of captured output