Debugging
Troubleshoot workflows with history, emissions, and common fixes.
Use workflow history and internal diagnostics to understand what happened and why a workflow is waiting or failed.
History and emissions
The history endpoint returns step results, user events, and persisted step emissions.
curl "$BASE_URL/approval/instances/inst_123/history"Tips:
- Inspect step
status,attempts,nextRetryAt,wakeAt, and error fields. - Inspect events to verify their type and whether they were delivered and consumed.
- Inspect emissions to understand values emitted by the active step.
- Use the current-step emissions route with
once=truefor a snapshot, or without it for a live JSON stream.
Internal workflow diagnostics can be enabled with the fragment's logging config. These logs are
written to the runtime console and are not returned by the history endpoint.
Common issues
Instance never runs
- Ensure the durable hooks dispatcher is configured and running.
- Ensure
autoTickHookshas not been disabled outside a manually driven test.
Stuck in waiting
- Verify the event
typematches the workflow'swaitForEventcall. - Use history to inspect buffered events and the wait step's
waitEventTypeandwakeAtfields.
Repeated retries or timeouts
- Check
retries.limit,retries.delay, andretries.backoffonstep.docalls. - Check whether the callback threw
NonRetryableErroror a subclass; these bypass the configured retry schedule by design. - Check
timeoutonwaitForEventcalls. A timeout throws the non-retryableWaitForEventTimeoutError. - Look for the latest step error in history; it includes the error name and message.
Pause/resume not changing status
- The pause request is respected on the next tick; make sure the dispatcher is still running.
- If the instance is terminal (
complete,terminated,errored), it will not resume.
When to open an issue
If the instance is in a non-terminal state but no hooks are being processed, capture:
- the instance status and metadata
- history output
- runtime console diagnostics, if enabled
- dispatcher configuration