> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: RunOptions

> Generated from the public TypeScript API.

Flat per-run overrides.

Raw `runtimeConfig` is intentionally not accepted; construct another
`Agent` for runtime fields outside this curated set.

## Example

```ts theme={null}
const result = await agent.run("Review this change.", {
  model: "anthropic/claude-sonnet-4-5",
  maxTurns: 4,
})
```

## Extended by

* [`AgentStreamOptions`](AgentStreamOptions)

## Properties

### cwd?

```ts theme={null}
optional cwd?: string;
```

Working directory for this fresh session.

***

### maxBudgetUsd?

```ts theme={null}
optional maxBudgetUsd?: number;
```

Maximum run cost before an `error_max_budget` result.

***

### maxTurns?

```ts theme={null}
optional maxTurns?: number;
```

Maximum model turns before an `error_max_turns` result.

***

### model?

```ts theme={null}
optional model?: ModelId;
```

`provider/model` id for this session.

***

### outputFormat?

```ts theme={null}
optional outputFormat?: OutputFormatSpec<unknown>;
```

Structured-output contract for this session.

***

### permission?

```ts theme={null}
optional permission?: PermissionRuleset;
```

Server permission rules, distinct from `permissionMode`.

***

### permissionMode?

```ts theme={null}
optional permissionMode?: PermissionMode;
```

Runtime permission behavior for this session.

***

### signal?

```ts theme={null}
optional signal?: AbortSignal;
```

Abort the active turn; terminal `error_aborted` still resolves normally.

***

### title?

```ts theme={null}
optional title?: string;
```

Explicit session title; otherwise the prompt's first line is used.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.