Skip to Content
We are live but in Staging 🎉
WorkflowsWorkflow 3: Human-in-the-Loop Pause and Resume

Workflow 3: Human-in-the-Loop Pause and Resume

Last validated: 2026-05-14

Goal

Handle ask pauses safely by detecting paused threads, collecting user input, and resuming execution.

When To Use

  • Approval gates
  • Manual data confirmation checkpoints
  • Risk-sensitive branching where automation must wait for an operator

Current Product Reality

  • API ResumeThread is implemented.
  • CLI currently has no thread resume command.
  • Operational flow is hybrid: CLI for observation + gRPC/HTTP for resume.

A) CLI Observation Steps

# 1) Monitor execution dodil scriptum thread watch thr_paused_01 # 2) Confirm paused status dodil scriptum thread get thr_paused_01 -o json # 3) Inspect step details for context dodil scriptum thread steps thr_paused_01 --detail

Use case for each command:

  • thread watch: real-time detection of pause transition.
  • thread get: canonical status snapshot.
  • thread steps --detail: find exact failing/paused context before submitting manual input.

B) Resume via gRPC

grpcurl \ -H "authorization: Bearer $DODIL_TOKEN" \ -H "x-organization-id: $SCRIPTUM_ORG_ID" \ -d '{ "thread_id":"thr_paused_01", "step_input_override_json":"{\"approved\":true,\"comment\":\"reviewed by analyst\"}" }' \ rpc.dev.dodil.io:443 dodil.scriptum.v1.ScriptumService/ResumeThread

Argument guidance:

  • thread_id: paused thread identifier.
  • step_input_override_json: JSON payload matching pending input contract (types/options enforced).

C) Resume via HTTP Contract (Gateway)

curl -sS -X POST "https://api.dev.dodil.io:443/v1/scriptum/threads/thr_paused_01/resume" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "x-organization-id: $SCRIPTUM_ORG_ID" \ -H "Content-Type: application/json" \ -d '{"step_input_override_json":"{\"approved\":true}"}'

D) Continue Monitoring

dodil scriptum thread watch thr_paused_01 dodil scriptum thread result thr_paused_01 --save ./out/thr_paused_01

Validation Checklist

  1. Resume call returns non-failed status.
  2. Thread leaves paused state and progresses.
  3. Final terminal state and output are recorded.
  4. Manual input payload is archived for audit traceability.

Common Failure Reasons

  • Resume payload type mismatch.
  • Value not in allowed options.
  • Retry or expiration limits exceeded.
  • Thread is already terminal or no longer resumable.