# WorkflowResponseMode

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.workflowresponsemode/
> Summary: WorkflowResponseMode: How a workflow treats more than one answer to the same pending human request.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

How a workflow treats more than one answer to the same pending human request.

```csharp
[JsonConverter(typeof(JsonStringEnumConverter<WorkflowResponseMode>))]
public enum WorkflowResponseMode
```

## Fields

`Branch = 0` 

Every answer opens a new run that continues from the request, so a second answer
to the same request opens a second branch. The default.

`SingleAnswer = 1` 

One answer per request. Repeating the same answer follows the run the first one
started instead of opening another; a different answer is refused with
`409 Conflict`.

Two answers are the same when their `approved`, `text` and `data`
are the same; the checkpoint and definition version they name do not count. An
answer whose run stopped before the workflow received it (the connection dropped,
the run failed or was cancelled) can be given again, and it starts a new run. A
queued answer whose job is still waiting or running is followed instead: the job's
recovery owns that work.

**A run its process left running locks the request.** When a process
stops in the middle of a streamed answer's run, the run row stays
[RunStatus.Running](/api/tracon.runstatus/), and a repeat of the answer follows a run that never
moves. Only run reconciliation ([RunReconciliationOptions.Enabled](/api/tracon.runreconciliationoptions/#Tracon_RunReconciliationOptions_Enabled),
`Tracon:RunReconciliation:Enabled`, off by default) closes such a run: it closes
a [RunStatus.Running](/api/tracon.runstatus/) run whose heartbeat stopped. Turn it on where a
single-answer workflow must be answerable again after a crash.

A queued answer does not depend on reconciliation, which reads no
[RunStatus.Queued](/api/tracon.runstatus/) run. Once its job is written, the job continues or
closes the run. When the process stopped after the answer was recorded but before
its job was written, a repeat of the same answer writes the job and follows the run;
two repeats at the same time write it once.

## Remarks

The mode is chosen per workflow: [WorkflowDefinition.ResponseMode](/api/tracon.workflowdefinition/#Tracon_WorkflowDefinition_ResponseMode) for a
stored definition, `WorkflowRegistrationOptions.ResponseMode` for a workflow defined
in code. A run that waits keeps the mode of the definition version it recorded, so an
edit made while it waits does not change how it is answered.

Every answer that starts a run is written to the audit trail before the run starts,
whatever the mode, and refused when it cannot be written.

Written as a **name** in JSON (`"SingleAnswer"`), not a number.
