# Workflow runtime and troubleshooting

Workflow execution is stateful and bounded. The conversation stores the current node, its frozen Workflow snapshot, and runtime events needed to explain routing.

## Entry, waiting, and resume

A new conversation enters Start and follows its edge silently. When a Subagent or Procedure waits, Operade persists that node. The next user turn will resume from the current node rather than restart at Start. Entry behavior determines whether a node entered without a customer signal waits or generates immediately.

On each customer turn, the 20th transition is rejected before its target node is entered, so at most 19 successful target transitions can occur in an authored Workflow. Reaching that boundary records `workflow_loop_exhausted` and fails the conversation. **Prevent subagent loops** adds an earlier guard: the same Subagent cannot be re-entered twice during one customer message.

## Read Activity

Conversation detail **[Activity](/docs/monitor/transcript-and-activity)** shows `workflow_node_entered`, `workflow_node_completed`, `workflow_edge_evaluated`, `workflow_error`, and loop events with labels from the frozen snapshot. Tool and Procedure events appear in the same ordered record.

## Recover from failures

Read the earliest error event and its node or edge ID. Common causes are a missing Tool or document, invalid typed expression, no matching edge after a Tool result, Subagent loop prevention, and the transition limit. Fix the branch draft, run [Test chat](/docs/agents/test-chat), and Publish when every intended branch is exercised.

Existing conversations keep the old configuration snapshot and cannot be repaired in place by publishing. Start a new test conversation to verify the new version. Review [edge order](/docs/workflows/edges-and-conditions) and [expression types](/docs/workflows/expressions-and-variables) before increasing graph complexity.
