Skip to content

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.

Read the serial buffer:

Terminal window
microagent logs research

Follow new output as it appears:

Terminal window
microagent logs research --follow

Typical serial output begins with the guest boot log:

[ 0.000000] Linux version 6.1.0 ...
[ 0.512000] Run /init as init process
microagent: guest init started
research 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.

FlagDescription
--follow, -fStream 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.

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.

  • connect - an interactive console instead of captured output