# TraconAsyncRunOptions

> 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.traconasyncrunoptions/
> Summary: TraconAsyncRunOptions: Defines queued, durable run options.

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

Defines queued, durable run options.

```csharp
public sealed class TraconAsyncRunOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconasyncrunoptions/">TraconAsyncRunOptions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Read from the `Tracon:AsyncRun` configuration section.

**Enabled is the default**, as with the
`Idempotency-Key`. A request without `Prefer: respond-async` has
no additional cost or behavioral change; it does not issue a query. If this
were disabled by default, a client that sent the header would believe the
run was queued when it was not, which would be the real silent surprise.

## Constructors

### <a id="Tracon_TraconAsyncRunOptions__ctor"></a> TraconAsyncRunOptions\(\)

```csharp
public TraconAsyncRunOptions()
```

## Fields

### <a id="Tracon_TraconAsyncRunOptions_SectionName"></a> SectionName

Gets the configuration section name.

```csharp
public const string SectionName = "Tracon:AsyncRun"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Properties

### <a id="Tracon_TraconAsyncRunOptions_Enabled"></a> Enabled

Gets or sets whether `Prefer: respond-async` is recognized. When
disabled, a request that carries the header receives `501` rather
than silently falling back to synchronous execution. Defaults to [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool Enabled { get; set; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_TraconAsyncRunOptions_MaxAttempts"></a> MaxAttempts

Gets or sets the maximum attempt count for a queued run.

```csharp
public int MaxAttempts { get; set; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

#### Remarks

Defaults to **1** to prevent a side-effecting tool from
running twice when a lease expires and the job is reclaimed. Raising it
requires idempotent tools. "Durable" means a job does not disappear
silently, not that it can never be lost.
