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

# Run Controls

`agentcompass run` and `agentcompass launch` use the same set of run controls for scheduling, fault handling, and evaluation artifacts without changing the benchmark, harness, model, or environment configuration. Some controls change scope with the command: for example, task concurrency applies to the current evaluation request in `run` and to the complete orchestration in `launch`.

This page explains what each control does and how to use it. See [`agentcompass config`](/en/user_guide/using_agentcompass/cli/config) for configuration-file syntax and precedence, [`agentcompass run`](/en/user_guide/using_agentcompass/cli/run#parameter-reference) for the complete single-request signatures, and [`agentcompass launch`](/en/user_guide/using_agentcompass/cli/launch#validate-before-running) for multi-request orchestration and its CLI overrides.

| Goal                                                 | Primary options                                                       |
| ---------------------------------------------------- | --------------------------------------------------------------------- |
| Control task concurrency and provider capacity       | `--task-concurrency`, `--provider-limit`, `--env-open-qps`            |
| Limit the duration of the evaluation execution phase | `--timeout-seconds`                                                   |
| Handle recoverable transient failures                | `--max-retries`, `--retry-pattern-list`                               |
| Organize results and reuse completed tasks           | `--results-dir`, `--run-name`, `--run-id`, `--reuse`                  |
| Preserve state and diagnostics                       | `--keep-environment`, `--progress`, `--log-level`, `--file-log-level` |

## Scale Concurrency Safely

A [provider](/en/user_guide/modules/environments/overview#choose-a-provider) is the execution backend that creates and manages environments, such as Docker, Daytona, or Modal.

| Control                             | Scope                                                                                                     |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `--task-concurrency`                | Total benchmark tasks executing at the same time in the current process or one `launch` orchestration.    |
| `--provider-limit <provider=count>` | Task executions handled concurrently by one provider, including retry executions; `0` disables the limit. |
| `--env-open-qps <provider=qps>`     | New environments created per second by one provider; `0` disables startup pacing.                         |

Effective task concurrency is first bounded by the lower of the task concurrency limit and the applicable provider limit. `env-open-qps` controls only environment startup pacing, not the number of tasks already running. Model endpoint capacity, provider quotas, and local CPU and memory can reduce actual concurrency further. CPU and memory limits for an individual sandbox are environment parameters; see [Understand the Scope](/en/user_guide/modules/environments/configuration/resource_limits#understand-the-scope).

### CLI Syntax

In the CLI, repeat the latter two options for different providers. When evaluation requests use different environments, apply limits to each provider from one command:

```bash theme={"system"}
agentcompass launch evaluations.yaml \
  --task-concurrency 32 \
  --provider-limit docker=8 \
  --provider-limit modal=24 \
  --env-open-qps modal=4
```

A single `agentcompass run` needs limits only for the providers actually used by that request.

### Configuration File Syntax

In a [`--config` file](/en/user_guide/using_agentcompass/cli/config), use mappings for provider limits instead of repeating YAML keys:

```yaml theme={"system"}
runtime:
  provider_limits:
    docker: 8
    modal: 24
  env_open_qps:
    modal: 4

execution:
  task_concurrency: 32
```

The example above is a regular run configuration. In a `launch` orchestration file, put shared `task_concurrency` at the top level while keeping the provider mappings under `runtime`; see [`agentcompass launch`](/en/user_guide/using_agentcompass/cli/launch#what-the-fields-mean).

When tuning concurrency, first select a few representative Benchmark tasks and validate them with task concurrency set to `1`, then increase it gradually to `2` or `4`. Observe Environment startup latency, model latency, error rates, and memory use. Return to the last stable value when errors increase.

## Set an Appropriate Timeout

Timeouts consist of an outer evaluation deadline and inner limits provided by the selected Environment, Harness, and Benchmark. They can apply at the same time, and the first limit to expire ends the corresponding work. The table uses two parameter forms:

* `CLI` denotes an option that can be written directly in the command, such as `--timeout-seconds 3600`.
* A `JSON field` cannot be written as a standalone option. Put it in the JSON object accepted by the corresponding option. For example, pass `operation_timeout` as `--env-params '{"operation_timeout": 1800}'`; pass Harness and Benchmark fields through `--harness-params` and `--benchmark-params`, respectively.

<div style={{overflowX:'auto'}}>
  <table style={{minWidth:'900px', width:'100%', tableLayout:'fixed', fontVariantLigatures:'none'}}>
    <thead>
      <tr><th style={{width:'17%', whiteSpace:'nowrap'}}>Layer</th><th style={{width:'30%'}}>Parameter location</th><th style={{width:'53%'}}>Scope</th></tr>
    </thead>

    <tbody>
      <tr><td style={{whiteSpace:'nowrap'}}>Evaluation deadline</td><td>CLI: <code><span>-</span><span>-</span>timeout-seconds \<seconds></code></td><td>All tasks in one <code>run</code> share this limit, as do all requests in one <code>launch</code>. Timing starts after component preflight and covers task loading, preparation, execution, <a href="/en/user_guide/using_agentcompass/cli/analysis#run-with-evaluation">analysis</a>, and summarization. On expiry, unfinished work is cancelled and resource cleanup begins. The default is <code>360000</code> seconds (100 hours). Explicitly setting <code>0</code> disables the evaluation deadline; it does not affect the component-specific timeouts below.</td></tr>
      <tr><td style={{whiteSpace:'nowrap'}}>Environment creation</td><td>JSON field: <code>sandbox\_start\_timeout</code><br />Passed through <code><span>-</span><span>-</span>env-params</code></td><td>Applies to Environments that provide this field, including <a href="/en/user_guide/modules/environments/providers/daytona#provider-params">Daytona</a> and <a href="/en/user_guide/modules/environments/providers/modal#provider-params">Modal</a>. Each sandbox creation is timed separately. Expiry fails only that creation and does not limit later operations in a successfully created sandbox.</td></tr>
      <tr><td style={{whiteSpace:'nowrap'}}>Environment operation</td><td>JSON field: <code>operation\_timeout</code><br />Passed through <code><span>-</span><span>-</span>env-params</code></td><td>Applies to Environments that provide this field, including Daytona and Modal. It is the default deadline for one Environment operation, such as process execution or file transfer. Each operation is timed separately; this is not a cumulative deadline for the whole Benchmark task.</td></tr>
      <tr><td style={{whiteSpace:'nowrap'}}><a href="/en/user_guide/modules/harnesses/overview#configure-harness-parameters">Harness-specific</a></td><td>JSON field: defined by the Harness<br />Passed through <code><span>-</span><span>-</span>harness-params</code></td><td>The exact scope depends on the field. Some Harnesses use <code>timeout</code> for one task's total execution time, <code>command\_timeout</code> for one command, and <code>request\_timeout</code> for one service request.</td></tr>
      <tr><td style={{whiteSpace:'nowrap'}}><a href="/en/user_guide/modules/benchmarks/overview#configure-benchmark-parameters">Benchmark-specific</a></td><td>JSON field: defined by the Benchmark<br />Passed through <code><span>-</span><span>-</span>benchmark-params</code></td><td>The exact scope depends on the field. For example, SWE-bench <code>eval\_timeout</code> limits one task's evaluation command, while PinchBench <code>judge\_timeout\_seconds</code> limits one judge-model request.</td></tr>
    </tbody>
  </table>
</div>

## Retry Only Transient Failures

`--max-retries` sets the maximum number of retries after an execution fails. For example, `--max-retries 2` permits up to two more executions after the initial failure.

`--retry-pattern-list` accepts a JSON string array of regular expressions. It matches exception text from task execution or scoring, including tracebacks, and the `error` field returned by a Harness or Benchmark. Any matching expression makes the error eligible for retry. Matching is case-sensitive by default; use `(?i)` to ignore case. `--max-retries` still controls the retry count; omitting this option disables error filtering.

Retry only transient errors that may recover on another execution, such as dropped network connections, temporary service failures, or sandbox timeouts:

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env <environment> \
  --max-retries 2 \
  --retry-pattern-list '["(?i)connection.*reset","(?i)temporar","(?i)sandbox.*timeout"]'
```

Do not retry invalid JSON, missing credentials, incompatible images, deterministic test failures, or unsupported component combinations. For an official evaluation, use `--max-retries 0` unless its procedure defines a retry policy.

## Output and Reuse

### Name a New Run

The three options correspond to different levels of the result path:

```text theme={"system"}
<results-dir>/[<run-name>/]<benchmark>/<model>/<run-id>/
```

* `--results-dir` sets the result root and defaults to `results`.
* `--run-name` adds an optional experiment-group directory.
* `--run-id` names this run's directory; the current timestamp is used when it is omitted.

The following command uses `ablation` as the experiment group and gives this run the fixed name `baseline`:

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env <environment> \
  --run-name ablation \
  --run-id baseline
```

With the default result root, the path is `results/ablation/<benchmark>/<model>/baseline/`. See [Understanding Evaluation Results](/en/user_guide/other_features/results) for the complete directory and file layout.

### Resume an Interrupted Run

Use `--reuse` to continue an evaluation from an existing run. AgentCompass reuses results by task ID: detail files for completed tasks are copied into the new run, while tasks with no detail file or only an [`_error_` detail file](/en/user_guide/other_features/results/task_results#error-detail-files) are run again:

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env <environment> \
  --reuse
```

Without a value, `--reuse` selects the latest run under the current `<results-dir>/<run-name>/<benchmark>/<model>/` hierarchy. Pass a run ID to select an exact source under that hierarchy:

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env <environment> \
  --reuse 20260806_120000
```

AgentCompass does not search across hierarchies when the `results-dir`, `run-name`, benchmark, or model differs from the source. Even after finding a source, it only matches files by task ID; it does not verify that the model endpoint, harness, environment, code revision, network policy, task selection, attempt count, or scoring settings are equivalent. Keep every setting that affects evaluation results stable when reusing them. The new run records its reuse source and preserves reused detail files for traceability.

## Keep Environments for Debugging

Add `--keep-environment` when a failure requires direct inspection of task or verifier sandboxes:

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env <environment> \
  --keep-environment
```

AgentCompass then skips provider cleanup for environments created by the run. Retries and multiple tasks may leave several resources active, so release them later with the provider's tooling. Harness sessions are still closed normally.

## Logs and Progress

| Option                     | Default | Accepted values                                 | Purpose                                                                                                                                                                                       |
| -------------------------- | ------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--progress <mode>`        | `auto`  | `auto`, `plain`, `none`                         | Controls terminal progress: `auto` shows a live view only in an interactive terminal, `plain` prints text progress suitable for CI or redirected logs, and `none` disables terminal progress. |
| `--log-level <level>`      | `INFO`  | `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` | Sets the minimum console log level.                                                                                                                                                           |
| `--file-log-level <level>` | `DEBUG` | `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` | Sets the minimum level for run logs saved in the result directory.                                                                                                                            |

`--progress` controls only terminal rendering. AgentCompass still saves progress, logs, and task results in every mode.
See [Results](/en/user_guide/other_features/results#directory-layout) for their locations.
