Skip to Content
We are live but in Staging πŸŽ‰
CLI GuideThreads & Results

Threads & Results

A thread is one execution of a script version. Threads run in the cloud β€” you create one, the platform schedules and runs it as a durable, resumable unit, and you read status, events, results, and step detail back over the CLI. There is nothing to configure about where it runs.

thread create <script>

Start execution and return thread metadata immediately, without waiting for it to finish.

FlagMeaning
--inputInline JSON or @file
--versionScript version (0 = active)
--envLoad the effective merged environment into the run
dodil scriptum thread create invoice-parser \ --input @./prod_input.json \ --version 3 \ --env \ -o json

thread run <script>

Create a thread and follow it to a terminal state in one command. Inherits the create flags and adds:

FlagMeaning
--resultPrint the final result after completion
--saveSave output and step files to a directory
dodil scriptum thread run invoice-parser --input @./input.json --result dodil scriptum thread run invoice-parser --input @./input.json --result --save ./out/run-001

run attempts a WatchThread stream first and falls back to polling thread get if the stream cannot be established. It stops at a terminal status (completed, failed, cancelled).

thread watch <thread-id>

Follow an existing thread created elsewhere. Stream-first with polling fallback; stops on a terminal status.

dodil scriptum thread watch thr_abc123

thread get <thread-id>

Query current status and step progress.

dodil scriptum thread get thr_abc123 -o yaml

thread list

Find recent runs by script or status.

FlagMeaning
--scriptFilter by script name
--statusFilter by thread status
--page-sizeMax number of results
dodil scriptum thread list --script invoice-parser --status failed --page-size 100

thread result <thread-id>

Fetch the final output and a summary.

FlagMeaning
--saveWrite output and step files to a directory
dodil scriptum thread result thr_abc123 dodil scriptum thread result thr_abc123 --save ./out/thr_abc123

--save writes output.json, summary.json, and a steps/ directory. When the output is flagged truncated, --save automatically streams the full payload before writing it.

thread steps <thread-id>

Inspect step progress. The default is a summary table; flags narrow or expand it.

FlagMeaning
--stepShow one step’s detail by path (e.g. 1.2.0)
--detailStream full input/output for every step
dodil scriptum thread steps thr_abc123 dodil scriptum thread steps thr_abc123 --step 1.2.0 dodil scriptum thread steps thr_abc123 --detail

Step detail includes the primitive, tool, status, duration, input/output (truncated for display), and any execution ID or logs URL the runtime attaches.

End to end

# Start, watch, capture everything dodil scriptum thread run invoice-parser \ --input @./invoice_42.json \ --env \ --result \ --save ./out/invoice-42 # Investigate a failed run dodil scriptum thread get thr_failed_01 dodil scriptum thread steps thr_failed_01 --detail

Caveats

  • There is no thread cancel or thread resume subcommand in the CLI. Use the API for both β€” see API Gaps & Workarounds.
  • Large outputs may be returned truncated by the unary result call; use --save, which streams the full payload.

See also