Skip to content

mochi logs ​

View execution history and logs.

Synopsis ​

View execution history recorded in the data store, with associated log output. Optionally filter by executable reference.

shell
mochi logs [ref] [flags]

Examples ​

shell
mochi logs                          # all history
mochi logs --last                   # most recent entry with full output
mochi logs --status failed          # only failed runs
mochi logs --status running         # only in-progress runs
mochi logs --source mcp             # only runs launched by an AI/MCP client
mochi logs --session <id>           # everything one agent session ran
mochi logs run build                # history for 'run build' executable
mochi logs --running                # list active background processes
mochi logs -o json --tail 50        # include the last 50 lines of each run's output
mochi logs --last --grep ERROR      # last run, only lines matching /ERROR/

Options ​

FlagTypeDescription
--clientstringFilter history by the client that launched the run (e.g. 'claude', 'cursor').
--contentInclude each record's log output (json/yaml only; already shown for --last text output).
--grepstringInclude only log lines matching this regular expression (implies --content).
-h, --helphelp for logs
--lastPrint the last execution's logs
--limitintMaximum number of records to display.
--max-bytesintCap included log output to the last N bytes, keeping the tail (implies --content).
-o, --outputstringOutput format. One of: yaml, json, or tui.
--runningShow only active background processes.
--sessionstringFilter history to a single provenance session ID (e.g. an AI agent session).
--sincestringFilter history to entries after a duration (e.g. 1h, 30m, 7d).
--sourcestringFilter history by run origin, e.g. 'cli', 'desktop' or 'mcp'.
--statusstringFilter history by status (running, completed, failed, or cancelled; success/failure accepted as aliases).
--tailintInclude only the last N lines of log output (implies --content).
-w, --workspacestringFilter history by workspace name.

Options inherited from parent commands ​

FlagTypeDescription
-L, --log-levelstringLog verbosity level (debug, info, fatal) (default "info")
--syncSync flow cache and workspaces

See also ​