Skip to main content
Read what Mo has said in a session. By default the command returns immediately with the transcript so far; pass --timeout to block until Mo finishes its current turn or asks a question, which is the usual way to follow a running session from a script or coding agent.

Arguments

string
required
The session to read, from the output of mo start.

Options

string
default:"0"
Maximum time to wait for new output. Accepts 0 (return immediately) or a value such as 30s, 2m, or 500ms, up to 290s. Loop the command to follow a long session.
string
default:"start"
Where to read from. start returns the whole transcript plus anything Mo says while the command waits. latest skips the existing transcript and returns only output produced while the command waits, so a polling loop does not reprint earlier messages.
boolean
Print the raw response as one JSON object instead of plain text.

Output

In plain-text mode, the command prints each message on stdout. Two status lines can appear on stderr:
  • Mo is still working. when the timeout ran out before Mo finished.
  • Mo was stopped. when the session state is stopped, for example after mo stop or a stop from the dashboard.
With --json, the object has this shape:
state is one of starting, working, waitingOnUser, waitingOnAgents, idle, or stopped. timedOut is true when the command returned because the timeout ran out while Mo was still working. pendingInput is present only when Mo is waiting for an answer; reply with mo send.

Examples

Follow a session until Mo stops working: