Skip to content

Running Evaluations

The Eval Set Config

An eval set config is a YAML file that defines a grid of tasks, agents, and models to evaluate. Hawk runs every combination.

Here's a minimal example:

tasks:
  - package: git+https://github.com/UKGovernmentBEIS/inspect_evals@dac86bcfdc090f78ce38160cef5d5febf0fb3670
    name: inspect_evals
    items:
      - name: mbpp

models:
  - package: openai
    name: openai
    items:
      - name: gpt-4o-mini

limit: 1  # optional: cap the number of samples

Submit it:

hawk eval-set config.yaml

Model declarations

Declare every model the evaluation may call in models, model_roles, or additional_models, including models selected through task arguments, monitors, graders, and fallbacks. Ordinary launches and resumes require at least one real evaluation model in models or model_roles; none, none/none, and declarations only in additional_models or the online scan configuration do not count. Each declared model must resolve to a Middleman access group. Registered human evaluations started with hawk human eval start may omit models; setting human_eval options alone does not grant this exception.

A provider-qualified name that resolves to a placeholder, such as openai/none, is refused with HTTP 422 in models, model_roles, additional_models, online scan.model and args.default fallbacks, in eval and scan configs. Write none or none/none where no model is intended.

Have task code use inspect_ai.model.get_model() for the model under evaluation and get_model(role="grader", required=True) for auxiliary models declared in model_roles. This keeps model selection and access declarations together instead of duplicating model names in task code or task arguments.

For monitors, declare every model they may select, including primary, fallback, and summary models. Prefer model_roles when the monitor actually reads that role; otherwise declare the models in additional_models. A role declaration does not change a monitor that selects its model through task arguments.

Package declarations must also follow the code source requirements, including on resumes.

Additional models called by code

Use additional_models for models that tasks, scorers, or dynamically created clients call outside the models evaluation combinations. Declare models hidden in task or scanner defaults explicitly. The entries use the same package/provider structure as models. For example, a task argument that selects a hidden grader also needs a matching model declaration:

tasks:
  - package: example-evals
    name: example-evals
    items:
      - name: reasoning
        args:
          grader_model: anthropic/claude-opus-5-5
additional_models:
  - package: anthropic
    name: anthropic
    items:
      - name: claude-opus-5-5

The same declaration is needed for each model selected by a monitor's arguments or defaults. Hawk cannot discover model dependencies inside arbitrary task arguments.

Hawk installs the package, configures the provider environment, and includes the model in permission and output-sensitivity checks. A declaration does not construct a model client or add evaluation combinations. Configure the client in task or scorer code. Neither the package wrapper nor an item accepts args, including args: {} or args: null.

For package: inspect-ai, use a qualified item name such as anthropic/claude-opus-5-5 and install its SDK through a provider package or the top-level packages field. Reading a model's transcripts does not grant permission to invoke it. Models that read eval inputs or run online scans follow the cross-lab rule.

When an online scan is configured, every remote model in the eval set's additional_models counts as a reader, even if scan.model is omitted. Private source models' read policies can reject a cross-provider additional model even when you intend to use it only from task or scorer code. Local mockllm/... and hardcoded/... additional models aren't judged as readers; their declared identities and access-group checks still apply. Remote aliases such as openai/mockllm/model require registry metadata and are judged like any other reader. The --allow-sensitive-cross-lab-scan override requires the operator-enabled cross-lab override flag.

Monitor failure policy

metr_agents/action_monitor escalates a tool call it cannot score (for example, when its model call is denied) to the next approver in the chain, marked UNSCORED. Since metr_agents v0.3.40 this can't be changed: the on_error argument was removed, and passing it fails the run at startup with a TypeError. The next approver decides: a human approver holds the call for review, and an auto approver with decision: approve runs it. Declaring models doesn't change this.

Restricted credentials

Pass --restricted-credentials or --user-credentials to hawk eval-set run and hawk eval-set resume; Credential mode covers the deployment default and resumes. With Hawk's credentials, a restricted run can call only the models it declares; if one is denied, add it to the config and resume with --config.

Declare input eval sets in transcripts.sources, which needs restricted mode:

transcripts:
  sources:
    - eval_set_id: source-eval-set-id
# Omit access_groups to inherit all model/code restrictions automatically.
# access_groups: [model-group, code-access-task-group]

At launch and at each resume, the cross-lab rule judges every input, and its override (--allow-sensitive-cross-lab-scan) applies where the operator permits it. An input is refused, override or not, if it carries a non-public model access group that none of its recorded models belongs to. This happens when the source declared extra access_groups, used a private fallback model, or ran a model that has since changed groups. Task code reads inputs through the Hawk API's signed URLs (Transcript inputs in task code). What an approved run can read later is in Inputs.

access_groups also needs restricted mode (Output restrictions).

For jobs with execution history, resume recovers stopped runners and retries unfinished cleanup; see Delete and resume. Custom runner images need the restricted startup module. Online scan: configuration isn't available in restricted mode; use a standalone scan.

Transcript inputs in task code

Declare input eval sets once in transcripts.sources. The eval transcripts object accepts only sources, which is required when the object is present. Omitting transcripts, setting it to null, or using sources: [] declares no inputs. Eval filters are rejected, including filter: null; tasks choose samples, grouping, rubrics, and other selection rules themselves.

Task, solver, and scanner factories can read those identities and resolved folder locations before execution starts:

import hawk.runtime
import inspect_ai.log

for source in hawk.runtime.transcript_sources():
    print(source.eval_set_id)
    logs = inspect_ai.log.list_eval_logs(source.location)
    # Select the logs/samples needed to construct your task's dataset.

The helper returns a tuple of immutable records with eval_set_id and location fields, preserving declaration order and duplicates. Runs on the cluster receive hawksrc://evals/<eval_set_id> locations, which inspect_scout.transcripts_from and Inspect's log functions open directly; under hawk local, locations are S3 folders. A source's per-sample artifacts are readable under <location>/artifacts/<sample_uuid>/ with fsspec; for a hawksrc:// location, pass exclude_dirs=[".git"] to fsspec.core.url_to_fs to skip directories by name. A hawksrc:// file rewritten after the run first read it raises hawk.client.fs.SourceChangedError (an OSError) instead of mixing versions; call fs.invalidate_cache(path) and re-open it to read the new version. The helper reports the declared sources, including for scans; it does not apply Scout filters or implicitly add the output folder. An explicitly empty source list returns (). Missing context (for example, under plain inspect eval) or malformed context raises RuntimeError. Tasks that also support plain Inspect can use an explicit input argument instead.

The helper imports without Inspect, Scout, or Hawk's API dependencies. It does not fetch files or grant access: restricted tasks read inputs only through the API's signed URLs and cannot query human-facing metadata APIs. Hawk does not copy inputs into the pod or agent sandboxes. Custom runner images need the updated Hawk package.

For hawk local, set HAWK_RUNNER_EVALS_S3_URI to the input eval root, or set HAWK_API_S3_BUCKET_NAME to use s3://BUCKET/evals. Neither setting is needed for an eval without inputs. Local credentials remain the caller's responsibility. Context is available in task-loading threads and child processes and is restored after each direct invocation, including failures. Concurrent runs in one Python process are unsupported; use separate runner processes.

Admission priority

Use --priority low|medium|high to choose the priority for cluster admission and inference requests. The default is medium for both launches and explicit resumes:

hawk eval-set config.yaml --priority high
hawk eval-set resume EVAL_SET_ID --priority low

Each explicit resume uses its current option or the default, including when --config supplies a replacement config.

On a deployment that enrolls this job type in Kueue, these map to numeric priorities -100, 0, and 100. These values are Hawk's convention: their ordering matters, and the spacing has no special scheduling effect. Within a shared queue, priority orders waiting, enrolled work from every user and Hawk deployment in the cluster. It grants no capacity entitlement or permission, does not preempt running work, and does not guarantee a reservation or start time.

Kueue uses BestEffortFIFO, so a lower-priority job that fits can be admitted while a higher-priority job waits for a resource shape that is unavailable. Coordinate deliberate expensive jobs with other cluster users rather than treating high as a capacity reservation.

When a deployment enables Kueue admission, it covers runners and standard-chart sandbox services together. Each new sandbox release inherits the runner Job's current priority label; a failed read or missing label warns and keeps the submission's priority. Existing sandbox releases keep their priority. See the Kueue operator guide for configuration and the accepted multi-service partial-admission limitation.

Submission guard

Deployments can enable an accidental-burst guard for outstanding runner Jobs. The guard is disabled by default; when enabled, its default threshold is 128 pending, queued, or running jobs for the deployment and submitting user. Jobs that completed successfully or failed do not count. New Jobs use a stable hashed subject label. Older Jobs without that label are counted conservatively through their legacy sanitized creator label in the expected deployment namespace; this can overcount if two legacy values collide, and it does not relabel those Jobs.

The guard covers both hawk eval-set config.yaml and hawk eval-set resume. A threshold refusal returns HTTP 429 with the observed count and limit; a count failure returns HTTP 503. Pass --force only for a purposeful large submission that you have coordinated with other cluster users. It skips the guard and its count for that request; authentication, configuration validation, and native admission still apply. Because the guard's lock is local to one API process, it reduces accidental bursts rather than enforcing an exact distributed quota.

Specifying models

Hawk looks up items[].name against the public names from hawk models. package is the Inspect provider package, and name is the Inspect provider used at runtime. For a direct provider those three fields line up: package: openai, name: openai, items[].name: gpt-4o-mini.

OpenAI's own models (openai/<model>, not aggregator names such as openrouter/...) that use the Responses API stream their calls by default: for the models and model roles of eval sets and scans, Hawk sets stream_idle_timeout: 1830 in their config. Inspect uses the Responses API for OpenAI's reasoning models and for model names it doesn't recognize (unless the model's config sets num_choices), for image output set in a model's config, and for any OpenAI model with responses_api: true in its args; a chat model that uses it only for calls with native tools, or with image output requested per call, gets the default only with responses_api: true in its args. Calls that Inspect sends in background mode or in a batch never stream, and fail through Middleman, which can neither create an OpenAI batch nor poll a background response. Inspect uses background mode by default for some OpenAI models and for calls with reasoning_mode: pro; background: false in a model's args sends its calls in the foreground instead. Middleman keeps the stream alive while the model thinks, so a call can stay silent up to Middleman's idle limit (30 minutes by default) instead of being timed out after the OpenAI SDK's 10 minutes and sent again. Set stream_idle_timeout in a model's args.config to change the timeout (below 1800, the runner gives up on a silent call before Middleman does), or streaming: false in its args to send its calls unstreamed. A model that task or scorer code builds with get_model() gets the default only when Inspect hands back one of Hawk's models: for no name, a role, or the same name, config and args. Otherwise set stream_idle_timeout in its config; streaming=True in get_model() also streams, but without Inspect's unstreamed fallback for a server that refuses.

Aggregator providers (OpenRouter)

Inspect's convention is openrouter/<org>/<model> (Inspect providers). Aggregator names in hawk models include that provider prefix, for example openrouter/meta-llama/llama-3.3-70b-instruct. Put the full public name in items[].name. Keep package and name as the Inspect package that talks to Hawk's gateway (usually openai / openai for OpenRouter):

models:
  - package: openai
    name: openai
    items:
      - name: openrouter/meta-llama/llama-3.3-70b-instruct

Do not split the Inspect string across name and items[].name. Hawk never concatenates those fields when checking permissions, so this fails with "Models not found or not accessible":

models:
  - package: openai
    name: openrouter
    items:
      - name: meta-llama/llama-3.3-70b-instruct

Together follows the same prefix rule as OpenRouter. Hugging Face does not: Middleman leaves those catalog names unprefixed, so adding hf/ will fail validation. In every case, copy the exact name from hawk models into items[].name.

Adding Agents

Hawk looks up agents: items in Inspect's agent registry and solvers: items in its solver registry, so list each item under the kind it is registered as. metr_agents react is a solver; under agents: the run fails with LookupError: metr_agents/react was not found in the registry.

solvers:
  - package: git+https://github.com/METR/inspect-agents@metr_agents/v0.3.20#subdirectory=packages/agents
    name: metr_agents
    items:
      - name: react

Eval Parameters

These fields are passed through to inspect_ai.eval_set():

Field Description
limit Maximum samples to evaluate
time_limit Per-sample time limit in seconds
message_limit Maximum messages per sample
epochs Number of evaluation epochs
eval_set_id Custom ID (auto-generated if omitted)
metadata Arbitrary metadata dictionary
tags List of tags for organization
log_images Whether to log base64-encoded images in the eval log. Omit to use inspect-ai's default (true).

The concurrency knobs (max_samples, max_tasks, max_sandboxes, max_subprocesses) are also passed through — see Concurrency for large eval sets.

For the complete list of fields, see the Eval Set Config Reference or the Inspect AI docs.

The submission priority applies to all Middleman calls, including model roles and online scanners. It overrides any x-middleman-priority header supplied by the task or model configuration.

Model credential renewal

Eval and scan model calls using Hawk's renewable credentials need at least two model-call retries to recover after an idle token expires. Leave max_retries unset to use Inspect's default, or set it to at least 2. For evals, this is a top-level config field; for scan models, set args.config.max_retries on each model that overrides the default.

Renewal runs in the background. After a 401, the first retry can still use the expired key; another retry picks up the replacement. With max_retries: 0 or 1, the sample can fail even if renewal succeeds. Slow renewal or an outage can require more retries; 2 is a minimum, not a guarantee. This is separate from retry_attempts, which retries whole failed tasks.

Concurrency for large eval sets

Four optional knobs bound how much work runs at once. All are positive integers, and each is only a ceiling — the eval set may run below it when there isn't enough work to fill it. hawk/examples/concurrency.eval-set.yaml sets them in a runnable config.

Knob Bounds Scope If unset
max_samples Samples running in parallel Per task Hawk default (1000)
max_tasks Tasks running in parallel Per eval set Hawk default (1000)
max_sandboxes Sandboxes running in parallel Per sandbox provider 120 per agent model, or twice a fixed connection limit, capped at 500
max_subprocesses Subprocesses running in parallel Per runner The runner pod's CPU count

Mind the scopes — they compose rather than competing:

  • max_tasks × max_samples is the memory lever. inspect-ai creates one sample semaphore per running task, so that product — not either knob alone — bounds the samples in flight, and peak runner memory scales with concurrently-active transcripts. For a set that OOMs the runner, lowering max_samples lowers that bound, but while many tasks run at once the total can stay high, so lower max_tasks too.
  • max_sandboxes is per sandbox provider, not a global pod count. When unset, it is 120 for each agent model (each entry in models, or a task's own model) whose connections are left adaptive: what max_connections: 60 gives, and well within the adaptive ceiling. An eval set with several agent models runs them all on one runner, which can slow its samples down. Models that share a connection pool count once, at the smallest limit any of them gives it, and a model role such as a grader or monitor left on default adaptive adds nothing, since it runs within the agents' samples. A model that is limited adds twice its limit: its max_connections (set on the model, in its task's config or at the top of the eval set), the ceiling adaptive_connections sets (100 for true, so 200), or the provider's own default (10 for most) when adaptive_connections is false. The result is capped at 500 or the platform's sandbox ceiling, whichever is lower; a platform ceiling above 500 only raises what an eval set may set itself. A multi-service sample takes one permit but can still start several pods.
  • adaptive_connections is a separate axis. It bounds model API concurrency (connections per provider) rather than pods or samples, though it feeds the max_sandboxes derivation above. Pass an integer to set the controller's ceiling; an explicit per-model max_connections takes precedence and disables adaptive for that model. Left unset or set to true, the ceiling is 500 connections, above inspect-ai's default of 100, for each model the eval set lists and a task's own model; with true at the top level (or in a task's own config, for that task), every model gets it, including ones a solver or scorer creates. Adaptive still backs off on rate limits, and this doesn't change how max_sandboxes is sized. See adaptive connections.

Platform ceilings

Deployments can bound each knob via HAWK_API_EVAL_SET_MAX_SAMPLES_CEILING, …_MAX_TASKS_CEILING, …_MAX_SANDBOXES_CEILING, and …_MAX_SUBPROCESSES_CEILING.

A launch requesting more than a ceiling is rejected with a 422 listing every violation, rather than being quietly lowered, so a new launch runs the values you submitted. Ceilings bind knobs you omit too: with …_MAX_SAMPLES_CEILING=100, a config that never sets max_samples runs at 100, not the 1000 default.

Unless a deployer changes them, the ceilings are the limits every eval set ran at before these knobs existed: 1000 for max_samples and max_tasks, and 500 for max_sandboxes, because sandboxes consume shared cluster capacity. max_subprocesses has no ceiling unless a deployer sets one. A sharded eval set applies every ceiling in each worker pod and splits an explicit max_sandboxes over its units.

Resuming is grandfathered: a stored config that a since-lowered ceiling would now reject is lowered to fit instead, with a warning in the response, so tightening a ceiling can't strand an already-checkpointed eval set. A config you pass when resuming is checked like a new launch.

Ceilings are guardrails against overloading a runner or the cluster by mistake, not a security boundary. The runner, not the API, bounds an omitted max_sandboxes or max_subprocesses, so an eval set pinned with --image or --image-tag to a runner image built before these knobs keeps the old limits for those two: a derived max_sandboxes of at most 500 and inspect-ai's default max_subprocesses. Such an image also can't run a config that sets any of the four knobs: it fails with eval_set() got multiple values for keyword argument.

Sharded Eval Sets (experimental)

An eval set normally runs on one runner pod. With --sharding, Hawk deals its runs into units and runs each unit on its own worker pod. A run is one task item against one solver or agent and one model, with every model role in the config. Sharding needs restricted credentials:

hawk eval-set run config.yaml --restricted-credentials --sharding
hawk eval-set resume EVAL_SET_ID --restricted-credentials --sharding

--sharding with user credentials, even by deployment default, gets 422. The web Launch page has neither control, so launch from the CLI or the Python client (credential_mode="restricted", sharding=True).

What runs. An orchestrator pod has Inspect decide which runs are done, then deals the rest into at most N units, largest (samples times epochs) first, each to the least-loaded unit. Each worker pod runs its unit in one Inspect process and records it as finished once Inspect has returned a final log for every run in it. Every unit writes into evals/<eval-set-id>/, as an unsharded set does. runner.cpu and runner.memory size each worker.

How Hawk picks N. N is the smallest of:

  • the deployment's hawk:runnerMaxShards (default 8),
  • the number of runs: task items, times solvers and agents (if any), times models,
  • the smallest max_connections that the eval set pins (see Concurrency below),
  • an explicit max_sandboxes.

If a pin or max_sandboxes decides N, the CLI prints the launch response's warning, such as Sharding was requested, but this eval set runs on 4 runner pods, not 8: model 'x' pins max_connections=4.

Config hawk:runnerMaxShards N
80 tasks, 5 models (400 runs) 8 8
1 task, 3 models (3 runs) 8 3
96 tasks, 1 model pinned at 4 8 4

In these cases the eval set runs on one runner pod, with a warning such as Sharding was requested, but this eval set runs on one runner pod: it has one task run.

  • The eval set has one run or none.
  • The runner image is not the deployment default (runner.image, runner.image_tag, --image or --image-tag).
  • runner.cleanup is false.
  • The deployment has turned sharding off (hawk:runnerMaxShards is 1).
  • A max_connections pin, or max_sandboxes, is 1.

Concurrency. Only the limits you write into the config as the set's budget are divided, never below one. A top-level max_connections (which overrides every model's) and an explicit max_sandboxes are divided over the units. Without a top-level max_connections, models sharing a connection limit in Inspect form a pool, whose smallest pin is divided over the units that run a pinned model of it (a pinned role runs in every unit); a unit running none gets one connection to it. A pin of 0 (the provider default) is not divided. Adaptive connections, a derived max_sandboxes, max_samples, max_tasks, max_subprocesses and the ceilings in Concurrency for large eval sets apply in each worker pod, so a sharded set can run up to N times one pod's sandboxes, tasks, subprocesses and adaptive connections. Limits Inspect applies over the divided ones (a task-level Task(config=GenerateConfig(max_connections=...)), or a call-site get_model(role=..., config=...) on a role the config doesn't pin) may run at up to N times their value.

Results. Status, hawk watch, hawk download, import and scans work as for any eval set. The viewer lists every task once the orchestrator has planned; logs.json is written at the end.

Stopping and failures. hawk stop works as for any eval set: running units score their samples, or error them with --error. A unit not yet started still starts, sets up and tears down every sample's sandbox, and records each sample as interrupted, so a stop takes about that long. hawk delete ends everything at once. A failed task is retried up to the set's retry_attempts, as in an unsharded set.

A unit whose worker pod ends without recording it (say, out of memory) is lost, as is one whose pod does not start in time (see Queueing). The other units carry on, then the eval set fails, naming the lost units and their runs (runs are numbered from 0 in the config's order: each task item, then each solver or agent, then each model); resume it to finish them.

Approvals and questions. With acp_server, every unit runs Inspect's ACP server on that port in its worker pod, and a sample that needs a human waits on its worker:

  • Answer tool-call approvals in the viewer (see Review tool approvals). It lists the samples awaiting approval and their workers, oldest first (rows can lag by about 10 seconds); click one to review it.
  • Answer ask_user questions with hawk acp EVAL_SET_ID --shard K, where K is the worker's shard; the viewer shows the command under the worker's N more waiting button. hawk watch counts what waits on each shard, as in Waiting on a human: shard 1 (2), shard 4 (1), or shard 2 (waiting list unreadable) for a running worker whose list can't be read.
  • approval_timeout_minutes applies in each unit as in an unsharded set.

The inspect-ai Hawk installs keeps the acp_server port in a unit. A sharded set runs only on an inspect-ai that speaks Hawk's protocol versions: with one from packages: that doesn't, the eval set fails before any unit starts (see Limitations).

Resuming. A resume shards only when it passes --sharding again; without it, the set resumes on one pod, with no warning. A sharded resume plans again from the current config, dealing only the runs still left into at most one unit per worker pod (extra pods exit), so it may use a different number of pods (or one); logs never move. Removing a task, or changing its config, leaves logs that match none of the set's tasks. A resume refuses them and the eval set fails, unless you relaunch it with hawk eval-set run --log-dir-allow-dirty and its eval_set_id.

Limitations.

  • In a set without acp_server, a sample that waits on a human (a tool call held by Inspect's human approver, or an ask_user question) errors. The sample's error says an operator interrupted it, and the runner log says why. Set acp_server to answer those requests (see Approvals and questions above).
  • Runs are dealt by sample count, not run time: one very large run still runs on one pod and leaves a long tail.
  • Runs that are one task to Inspect, such as a model listed twice or a solver written as inspect_ai/generate and as generate, are refused when the orchestrator plans: an eval set's tasks must be distinct.
  • Sharding needs an inspect-ai that speaks Hawk's capture and selection protocols; a packages: inspect-ai that does not fails the set before any unit starts.
  • A removed task's leftover started log keeps the status running, and so does a lost unit's, even after its resume.

Debugging. hawk stacktrace and hawk trace attach to the newest worker pod only. Runner log lines carry a shard field: orchestrator or the worker's index. A manual OOM-diagnostics capture (SIGUSR1) goes to PID 1, as on any runner pod.

Queueing. With Kueue admission, the N worker pods are admitted together, so N times the runner's CPU and memory must fit the runner queue. While they wait, the eval set reads running with no tasks, even while smaller jobs start. A set whose workers are not admitted within six hours of planning fails. After admission, a unit whose pod has not started within six hours (one hour from planning, without Kueue admission) is lost, but only once the units that did start have ended. A pod that cannot pull its image waits that long; hawk status shows the worker pods and hawk delete ends the run early.

Spend Cap

spend_cap stops an eval set when its estimated model spend reaches a dollar amount:

spend_cap: 500

It accumulates spend across tasks, samples, retries and resumes. Inspect's cost_limit applies to each sample separately. If you don't set it, your deployment's default cap applies, if it has one — hawk eval-set tells you so when you submit. An explicit spend_cap always overrides the default, whether lower or higher.

To run without a cap when the deployment has a default, write the word none:

spend_cap: none

Leaving spend_cap out, or setting it to a YAML null, means "use the default".

When the eval set reaches the cap, Hawk cancels unfinished work without scoring it and says why in hawk logs:

  • Completed samples and their scores are kept.
  • Running samples are cancelled, preserving their transcripts without scoring.
  • Samples and tasks that have not started are left for a resume.

To carry on, raise spend_cap in your config and resume:

hawk eval-set resume <EVAL_SET_ID> --config my-eval-set.yaml

The resumed run keeps completed samples and reruns cancelled and unstarted ones. Resuming without raising the cap fails straight away, since the money is already spent.

Hawk passes the cap to Inspect, which counts model usage as calls return, including native compaction.

A capped eval set needs a price for every model it declares: models, model_roles, additional_models and the scan model. Hawk takes prices from Middleman at submission, and a price in model_cost_config takes precedence. If a declared model has neither, Hawk rejects the submission and names the models. This includes models whose details Middleman keeps secret. Add their prices, in dollars per million tokens:

spend_cap: 500
model_cost_config:
  my-model:
    input: 3
    output: 15
    input_cache_read: 0.3
    input_cache_write: 3.75

A price of 0 is accepted and leaves that model uncounted.

OpenRouter models need no price. OpenRouter reports what each call was charged, which depends on the provider that served it, and the cap counts that charge instead of a price. A price you set for an OpenRouter model, including 0, does not change what is counted.

A monitor Hawk selects from model_preferences is counted like any other declared model, at Middleman's price for the model it picked. To leave a monitor out of the cap, give every candidate in model_preferences a price of 0 under model_cost_config.

Calls already in flight can take spend over the cap. A model that task code calls without declaring it is counted only if Inspect has a price for it; otherwise the runner logs a warning. Calls made directly from a sandbox are not counted. These estimates can differ from provider invoices.

Caps apply to hawk eval-set submissions and resumes. Human eval sessions and Scout scans do not enforce them. Users can set a cap higher than the deployment default; the default does not restrict how much a user is allowed to spend.

Inspect saves totals in .eval-set-spend.json in the eval set's log directory every 30 seconds and at shutdown. A crash or a failed save can lose charges since the last successful save. An unreadable or invalid saved total prevents startup. Runs made without a cap do not populate this file; enabling a cap later does not include those earlier charges.

A capped run needs a runner image that knows about spend caps. If you override the runner image (--image, --image-tag or runner.image) with one built before they existed, the run exits at startup with unrecognized arguments: --requires spend-cap and never runs uncapped. Rebuild the image from a current checkout.

Caps require one runner process. Hawk rejects a submission that would use multiple worker pods with a cap, including a deployment default. Submit without --sharding to run it with the cap.

Secrets and API Keys

Pass environment variables to your eval runner with --secret or --secrets-file:

# From your environment
hawk eval-set config.yaml --secret MY_API_KEY

# From a file
hawk eval-set config.yaml --secrets-file .env

# Both
hawk eval-set config.yaml --secrets-file .env --secret ANOTHER_KEY

By default, Hawk routes model API calls through its managed LLM proxy (supporting OpenAI, Anthropic, and Google Vertex). To use your own API keys instead, pass the matching key as a secret, disable the proxy's token refresh, and override that provider's base URL so it points directly upstream. For OpenAI, for example:

runner:
  environment:
    HAWK_RUNNER_REFRESH_URL: ""
    OPENAI_BASE_URL: https://api.openai.com/v1

You can also declare required secrets in your config to catch missing credentials before the job starts:

runner:
  secrets:
    - name: DATASET_ACCESS_KEY
      description: API key for dataset access

To install private packages with your own Git credentials, put Git's environment config in a secrets file and pass it with --secrets-file. It replaces Hawk's own Git setup for that run:

# git.env: keep it out of version control
GIT_CONFIG_COUNT=1
GIT_CONFIG_KEY_0=url.https://oauth2:<token>@gitlab.example.com/.insteadOf
GIT_CONFIG_VALUE_0=https://gitlab.example.com/

AWS Secrets Manager

If your deployment enables it, the runner can fetch a secret's value from AWS Secrets Manager instead of you passing it on the command line. Set type: aws-secrets-manager and the runner reads <default prefix><name> at startup, injecting the value as the environment variable name:

runner:
  secrets:
    - name: HF_TOKEN
      type: aws-secrets-manager
      description: Hugging Face token fetched by the runner at startup

With the default namespace (inspect-tasks/), that reads the secret inspect-tasks/HF_TOKEN.

To read a secret whose name differs from the environment variable — for example when several teams need their own value behind a shared variable name — add secret_name. It resolves under the same default prefix, and the task still sees HF_TOKEN:

runner:
  secrets:
    - name: HF_TOKEN
      type: aws-secrets-manager
      secret_name: team-x/HF_TOKEN

Use arn instead when the secret lives outside the default prefix entirely; it takes a full ARN with no wildcards. secret_name and arn are mutually exclusive.

Your deployment restricts which secrets a runner may read, so a secret_name or arn resolving outside the allowed namespace is rejected before the job starts. hawk local fetches these secrets with your own AWS credentials.

Additional Packages

Install extra Python packages into the runner's virtualenv:

packages:
  - git+https://github.com/some-org/some-package@0123456789abcdef0123456789abcdef01234567

Pin git packages to a commit SHA, as above. Without a ref, each run installs whatever the branch's latest commit is at that moment, so two runs of the same config can silently use different code: results aren't reproducible, and an upstream change can break your eval without anything on your side changing. Tags can be moved too; only a SHA is guaranteed never to change. Hawk warns after submission about every git package without a 40-character commit, and about a package the registry cooldown exempts (inspect-ai, inspect-test-utils) declared without an exact == version; a deployment can turn those warnings into refusals.

Cluster jobs ignore registry releases under a week old, except inspect-ai and inspect-test-utils. A pin like some-package==1.2.3 fails to resolve while 1.2.3 is that new; pin its commit SHA instead, or wait.

Private GitHub repos work automatically if Hawk's GitHub token or App has access. Write Git sources in packages as git+https:// or git+ssh://git@ URLs (accepted forms); runners fetch git@github.com: and ssh://git@github.com/ URLs, including a dependency's, over HTTPS. With Hawk's GitHub App, a private repository that code-access rules restrict is fetched only if your config declares it, for example in packages, including a dependency of your task. List repositories your task clones at runtime without installing them under code_sources, in the same forms as packages:

code_sources:
  - git+https://github.com/some-org/some-environment

Only the repository counts here: refs and subdirectories are ignored, and the runner's token covers the whole repository.

Overriding inspect-ai

Eval-set jobs install the same inspect-ai that Hawk itself runs, so a job can't silently pick up a version Hawk hasn't been tested against. Naming inspect-ai in packages: overrides Hawk's pin:

packages:
  - inspect-ai==<version>

(Nothing in an eval-set job uses inspect-scout — it only applies to scans, see below — so naming it here just installs an unused package. It doesn't override a pin, because there is no inspect-scout pin on this path.)

For scans: the same override mechanism also covers inspect-scout, since scan jobs install and pin both packages. Naming either in a scan config's packages: drops that package's extra and its pin. By default, scan jobs reuse the inspect-scout build that ships in the runner image; with the fresh rollback strategy, the pin comes from Hawk's own pyproject.toml instead. Either way, naming it in packages: overrides it.

packages:
  - inspect-scout==<version>

The two overrides are independent — overriding inspect-scout leaves inspect-ai pinned. Scout only declares a lower bound on inspect-ai, so releasing both would float inspect-ai to whatever is newest rather than to a pairing anyone has tested. If the pinned inspect-ai doesn't satisfy the Scout you asked for, resolution fails and you should name a compatible inspect-ai too:

packages:
  - inspect-scout==<version>
  - inspect-ai==<version scout accepts>

See Running Scans for the scan packages: field itself.

The override is matched by package name, so the entry has to name the package. A bare URL — the form shown under Additional Packages — won't be recognised, because it names no package until it is built:

packages:
  # Recognised: Hawk drops its inspect-ai pin.
  - inspect-ai @ git+https://github.com/my-org/inspect_ai_fork.git@my-fix

  # Not recognised: Hawk can't tell what this provides, so it keeps its pin
  # and the job fails with "no version of inspect-ai==<pinned version>".
  - git+https://github.com/my-org/inspect_ai_fork.git@my-fix

The same applies to any dependency that demands a newer inspect-ai than the pinned one — a task or scanner package declaring inspect-ai>=<something newer> makes the venv unresolvable and the job fails at install rather than quietly upgrading. Name a compatible inspect-ai in packages: to take control.

Runner instance generations

Use runner.instance_generations in an eval-set or scan configuration to require one of the listed EC2 generations for the runner:

runner:
  cpu: "2"
  memory: "8Gi"
  instance_generations: ["7", "8"]

Omit the field to use the cluster's allowed generations. The list must contain distinct positive integer strings. This setting applies only to the runner and is preserved on resume. Sandbox services retain their own placement configuration.

The job's list intersects the cluster policy configured with hawk:karpenterInstanceGenerations. For example, a job requesting ["6", "7"] on a cluster allowing ["7", "8"] can run on generation 7. A request with no overlap is rejected with HTTP 422 when the API has the cluster policy. Shared dev environments inherit that policy from the cluster owner's exported stack outputs. For externally managed clusters or owners that have not exported a policy, the API leaves validation to Kubernetes; an incompatible job remains Pending. Matching generations can still lack capacity or fail other scheduling requirements.

Use an updated Hawk client and API for this field. Generation does not select a processor manufacturer, architecture, or instruction set.

[Experimental] Custom Runner Images

You can use your own Docker image for the runner instead of the default:

runner:
  image: "<ecr-url>/custom-runners:my-image-v1"

Or via the CLI: hawk eval-set config.yaml --image <image-uri>

Images must have an explicit tag (:v1) or digest (@sha256:...). Tagless and :latest are rejected.

The image must be multi-arch or match the deployment's hawk:cpuArchitecture setting. A custom amd64-only runner requires an amd64 deployment.

Each Hawk deployment includes a custom-runners ECR repo with immutable tags. Get its URL with pulumi stack output custom_runners_ecr_url. Public images from any registry also work.

Look at the runner build stage in hawk/Dockerfile to see what a valid image looks like.

Sandbox Networking and Hardening

Sandbox network access is declared in your task's compose file or Kubernetes values.yaml, and the eval set's isolation can override it. Sandboxes are deny-by-default: no internet unless the task opts in, and network_mode: none isolates a service from its siblings as well.

See Sandbox Network Isolation for the full rules.

For evals that run code you expect to be hostile (cyber and offensive-security tasks, misuse probes), set isolation: strict, which runs each sandbox in a Nitro Sandbox if your deployment runs strict on Nitro, and under gVisor otherwise. See Isolation Levels.

Variables in compose files

Hawk fills in ${NAME} and ${NAME:-default} placeholders in a task's compose file before it starts the sandbox. Only these names are filled in:

  • SAMPLE_METADATA_<KEY>, one per key of the sample's metadata, upper-cased with spaces turned into underscores.
  • DOCKER_IMAGE_REPO, the deployment's task image repository.
  • HAWK_TASK_IMAGES, the deployment's protected task image repository, when it has one.
  • The keys of the eval set's runner.environment, with the values set there.

Any other name is treated as unset: ${NAME:-default} takes its default, and a bare ${NAME} is left as it is. Secrets passed with --secret or runner.secrets are never filled in, because the compose file comes from the task and its environment is visible to the agent in the sandbox. Configs that used to pass compose inputs as secrets should move them to runner.environment; see the upgrade notes. hawk local doesn't render the compose file, so Docker Compose would fill it from the local environment; it renders each file with docker compose config first and refuses to run if a secret would reach the sandbox. That check is a best-effort guard against the common ways a compose file reads a secret; the hosted runner is where only the names above are filled in.

services:
  default:
    image: ${DOCKER_IMAGE_REPO:-ghcr.io/example/tasks}:${SAMPLE_METADATA_TASK_VERSION:-latest}
    environment:
      DIFFICULTY: ${DIFFICULTY:-easy}   # set with runner.environment.DIFFICULTY

Sandbox concurrency

The runner sizes the k8s_sandbox concurrency knobs from its own resources at startup: INSPECT_MAX_POD_OPS (the exec thread pool, about 1.25 per sandbox in the resolved max_sandboxes, between 64 and 1024, and at most 160 per CPU of the runner's limit) and INSPECT_MAX_HELM_INSTALL / INSPECT_MAX_HELM_UNINSTALL (3 per CPU of the runner's cgroup limit, between 8 and 64). Anything you set in runner.environment wins over the derived value:

runner:
  environment:
    INSPECT_MAX_HELM_INSTALL: "4"

The runner also turns on longer server-side waits for commands run with Inspect's exec_remote (INSPECT_EXEC_REMOTE_SERVER_WAIT=1). sandbox.exec, which Inspect's built-in bash() and python() tools use, is unchanged. Inspect itself has the sandbox hold each poll until the command exits or prints, but only during the command's first 10 s; after that it polls every 5 s, so a command's end can go unseen for up to 5 s. With this on, the sandbox holds polls during the command's first 60 s, for up to 5 s each, and a poll that is not held is followed by a pause as long as the command has run so far, up to those 5 s. The start of an awaitable command is held as well, so a quick one takes a single request, and an awaitable command that keeps printing is polled every 0.5 s instead of back to back. Each held request occupies an exec thread, so by default the runner holds about one per sandbox and leaves a quarter of a thread per sandbox for other requests (INSPECT_EXEC_REMOTE_WAIT_CONCURRENCY); requests over the limit are sent unheld. Set INSPECT_EXEC_REMOTE_SERVER_WAIT: "0" in runner.environment to have no request held for an eval set.

Sandbox architecture

CPU sandbox services run on the deployment's default architecture (hawk:evalTaskArchitecture, amd64 unless the operator changed it) unless the task pins one per service. In a compose file, use the standard platform key, spelled exactly linux/amd64 or linux/arm64 — any other value is rejected before the eval starts:

services:
  default:
    image: ghcr.io/example/agent-env:1.4   # must publish a linux/arm64 variant
    platform: linux/arm64
  scorer:
    image: python:3.12                     # no platform: deployment default

Hawk adds the Graviton pool's taint toleration for an arm64 service, and platform: linux/amd64 keeps a service on x86 even where the deployment default is arm64. Hawk cannot check that an image exists for the chosen architecture: the service's image must publish a matching variant, or the pod fails to start. A multi-arch image needs no declaration. GPU services always run on amd64, so platform: linux/arm64 on a service that requests nvidia.com/gpu is rejected. Native Kubernetes values.yaml tasks express the same thing with nodeSelector: {kubernetes.io/arch: arm64}, where any value other than amd64 or arm64 is rejected too; the x-k8s extension does not accept nodeSelector.

A compose file whose only service is not named default also gets the chart's implicit default pod, which follows the deployment default, so name a lone service default (or mark it x-default: true) for the pin to apply to the pod the agent uses.

platform also changes local runs

Docker Compose honours the same key, so platform: linux/amd64 runs under emulation on an Apple Silicon laptop. Under hawk local with a ("k8s", "compose.yaml") sandbox the key is rejected outright, because sandbox patching only runs when HAWK_RUNNER_PATCH_SANDBOX is set.

GPU Tasks

GPU node pools are tainted (nvidia.com/gpu: NoSchedule) so that only workloads that need a GPU land on them. Any sandbox service that requests nvidia.com/gpu in its resource limits or requests automatically gets a toleration for that taint injected — task authors don't need to declare one. If a service already declares its own toleration that tolerates the taint (for example operator: Exists on the nvidia.com/gpu key), Hawk leaves the service's tolerations untouched. Operators can change what gets injected with the hawk:gpuNodeTolerations stack config option.

Container resource limits

Agents that size work from nproc, lscpu, free, or /proc/meminfo see the node, which is usually larger than the sandbox cgroup. Hawk injects the limits that actually bind into every patched k8s sandbox service as environment variables:

  • CONTAINER_CPU_LIMIT (Kubernetes CPU quantity, e.g. 500m or 2)
  • CONTAINER_MEMORY_LIMIT (e.g. 2Gi)
  • CONTAINER_EPHEMERAL_STORAGE_LIMIT (only when the pod spec sets one)
  • CONTAINER_GPU_LIMIT (only when the pod requests a GPU)

If the service omits resources, these match the inspect_k8s_sandbox chart defaults (500m CPU / 2Gi memory), or, for the default service, the deployment's hawk:sandboxDefaultCpu when it sets one. A task-supplied CONTAINER_* variable is left alone.

The same numbers are available as an Inspect tool, container_specs, that reads the live cgroup inside the sandbox. Hawk does not attach that tool, so existing evals keep their tool set. Task authors who want it add it themselves:

from inspect_ai.solver import generate, use_tools
from inspect_ai.tool import bash
from hawk.runner.container_specs import container_specs

solver = [use_tools(container_specs(), bash()), generate()]

Resuming Evaluations

Cluster eval-set jobs do not automatically retry failed runner pods, including after an out-of-memory kill or process crash. Investigate the failure, then resume explicitly:

hawk eval-set resume EVAL_SET_ID

For jobs with execution history, follow Delete and resume: retry pending cleanup, and run hawk delete EVAL_SET_ID only when the error requires it. Saved logs are kept.

Resume uses the existing eval logs to preserve completed samples and rerun unfinished work. Inspect's own sample/eval retries and model-request retries remain available within a running evaluation.

Monitoring

Logs

hawk logs                 # last 100 log lines for current job
hawk logs -f              # follow logs in real-time
hawk logs -n 50           # last 50 lines
hawk logs JOB_ID -f       # follow a specific job

Status

hawk status               # JSON report: pod state, logs, metrics, performance statistics
hawk status --hours 48    # include 48 hours of log data

The performance block (queue wait, working vs. waiting sample time, model-call and retry/error counts) is aggregated from the warehouse.

The resource_usage block holds the job's CPU and memory requested vs used and its sandbox count over time, sampled about once a minute. Its summary gives the mean and peak of each, plus request_to_usage_ratio, which shows whether the sandbox specs over-reserve. The summary is kept after the run completes. hawk watch shows the same numbers live. See Resource history for how the samples are recorded and when usage is unavailable.

Note

Samples reach the warehouse only once their eval log is imported, so the performance statistics cover finished samples — a mid-run report excludes the samples still in flight. Use hawk watch for live per-sample progress; it reads the runner's live sample buffer instead. For scan jobs performance is null.

Platform events

GET /monitoring/jobs/{job_id}/platform-events?from=&to= lists what the platform did to a job, oldest first: its submissions, deletion requests and ends, and, on deployments that read Datadog, its OOM kills, pod evictions, image pulls that failed (image.pull_failed, one per pod, naming the image) and other Kubernetes warnings, failed model calls (model.failures), stretches the runner's event loop was overloaded or frozen (runner.loop, with the code it was stuck in) and stretches the runner was stalled on memory (runner.memory: near its limit it is slowed, not OOM-killed), plus problems with the nodes the job had pods on (scope: node, with the sample_uuids of the samples whose pods were there; none means only the runner's). Anyone who may monitor the job may read it. from is inclusive, to exclusive, and both are clamped to the job's lifetime. An event that began before from and was still going then is listed too: a burst with last_seen after it, or a runner.loop stretch with until after it or none. sources says which sources answered, so a missing source is never mistaken for "no events".

Up to limit events come back; pass next_before as before for older ones. k8s is truncated when one read of the window hit its cap, and paging back reaches the older events. A Kubernetes event that a page boundary cuts through can come back on the next page with the same id and an earlier ts: keep one per id.

Every event has id, job_id, kind, source, severity, ts, message and scope (job, sample or node); these fields never go away. A repeating event keeps its id while its message grows: keep the latest. New kinds can appear at any time, so render an event of an unknown kind from those fields or skip it. An existing kind's fields never change; a new meaning gets a new kind.

severity is Hawk's judgment of how much the event matters to the job, as of this answer:

  • info: routine. The platform got past it by itself (a pod waiting for room under 15 minutes; a sandbox, mount or probe failure under 5; fewer than 10 retried model calls), or it hurt nothing (a node problem where no sample running there failed).
  • warning: worth knowing, such as an eviction, OOM kill or failed image pull whose samples all finished anyway.
  • error: it cost the job something.

It can change between answers, as an event goes on or its samples finish.

OOM kills come from a once-a-minute sample of each container's state. A runner's kill always shows, but a sandbox container that restarts before the next sample is missed.

Web Viewer

hawk web                  # open current eval set in browser
hawk web EVAL_SET_ID      # open a specific eval set
hawk view-sample UUID     # open a specific sample

Listing and Inspecting Results

hawk list eval-sets                     # list all eval sets
hawk list evals [EVAL_SET_ID]           # list evals in an eval set
hawk list samples [EVAL_SET_ID]         # list samples
hawk transcript UUID                    # download a sample transcript (markdown)
hawk transcript UUID --raw              # download as raw JSON
hawk transcripts [EVAL_SET_ID]          # download all transcripts

Running Locally

Run evals on your own machine instead of the cluster. Useful for debugging. The commands below use the repository's example file, so run them from the root of a cloned Hawk repository. Otherwise, substitute the path to your own config.

hawk local eval-set hawk/examples/simple.eval-set.yaml --priority high

--priority defaults to medium and also works with --direct. It sets the inference priority when requests are routed through Middleman.

This creates a fresh virtualenv in a temp directory, installs dependencies, and runs the evaluation the same way the cluster would. Locally, an unset max_sandboxes is capped at twice the CPUs the process may use, which is Docker's own default in inspect-ai.

Providing model API keys

By default, hawk local does not route model calls through Hawk's managed LLM proxy (Middleman). Inspect calls each provider's API directly, so you must supply the provider API keys yourself, or the run fails with authentication errors from the provider. When HAWK_AI_GATEWAY_URL is set and you are logged in, hawk local points each provider at that gateway and uses your login token as the key. See Using an AI Gateway. A provider key and its base URL are kept separately. Setting the key alone does not bypass the gateway, because Hawk still points that provider's base URL at the gateway when the base URL is unset. To call the provider directly, set its base URL to the provider's own endpoint, or unset HAWK_AI_GATEWAY_URL.

Set the environment variables for the providers your models use, for example:

export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
hawk local eval-set hawk/examples/simple.eval-set.yaml

Or keep them in a file and load it with --secrets-file:

# .env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
hawk local eval-set hawk/examples/simple.eval-set.yaml --secrets-file .env

You can also forward individual variables from your current shell with --secret NAME (see Secrets and API Keys above). Generate keys from your provider's dashboard (e.g. platform.openai.com, console.anthropic.com).

Note

To route through a managed gateway instead of using your own keys, see Using an AI Gateway below.

Debugging with --direct

Use --direct to skip the virtualenv and run in your current Python environment:

hawk local eval-set hawk/examples/simple.eval-set.yaml --direct

This lets you set breakpoints in your IDE and debug from the start. Note that --direct installs dependencies into your current environment via uv pip install, but model-provider packages (openai, anthropic, etc.) must already be present in the environment hawk was installed into. If they're missing, add them when installing hawk:

uv tool install --reinstall-package hawk "hawk[cli,runner]" --with openai

Note

Tasks from inspect_evals require openai even with a different model provider — inspect_evals imports it at load time, and missing it makes the task registry silently fail with LookupError.

Using an AI Gateway

Route model calls through a managed AI gateway:

export HAWK_AI_GATEWAY_URL=https://your-gateway.example.com
hawk login
hawk local eval-set hawk/examples/simple.eval-set.yaml

If the gateway is your deployment's Middleman URL, your login already approves it and hawk login needn't follow the export. Any other gateway is approved only by a login made after setting it; until then hawk local warns and calls providers directly.

Sample Editing

Batch edit sample scores or invalidate samples:

hawk edit-samples edits.json

See Sample Editing.

Importing Eval Files

Upload locally-produced .eval files into Hawk's warehouse so they appear alongside natively-run eval sets:

hawk import path/to/file.eval               # single file
hawk import path/to/dir/                     # directory of .eval files
hawk import path/to/dir/ --name my-import    # friendly name in the eval_set_id

Both hawk import and hawk scan import show detected and supplied code sources before uploading. Confirm that the list covers all files, or cancel and rerun with --code-sources sources.json to add missing sources. The file is a JSON array of canonical identities, for example ["github.com/example/tasks", "inspect-ai"]. If nothing is identified, Hawk asks whether to import with unknown sources. Both prompts default to no.

Scripts must use --yes (-y) to skip review:

hawk import ./results --code-sources sources.json --yes

Use [] in the file for no additional sources beyond log origins. --yes without a file records unknown alongside any detected origins. Matching rules determine code access; sources without a rule, including unknown, are public subject to model permissions. See import source policy for access checks and limits.

Imported eval sets get IDs prefixed imported- and have metadata.imported = true set. They appear in the warehouse, viewer, and hawk download identically to natively-run eval sets.

hawk import fails before uploading if the warehouse already holds any of the files' eval ids under another eval set; if every file's eval id is in one successful import of yours that you can still read, it first prints Already imported as <eval-set-id>. Matching is by eval id, so a log rescored since still matches.

Every sample needs a uuid, which the warehouse uses to identify it. Inspect writes one for each sample; logs converted from other harnesses may not, and hawk import refuses them before uploading.

Importing Scans

Upload one or more locally-produced Scout scans into the warehouse so their scanner results appear alongside natively-run scans:

hawk scan import path/to/scan_id=.../               # a single scan results directory
hawk scan import path/to/run/                        # a folder of scan directories
hawk scan import path/to/run/ --name my-import

PATH is either a single Scout scan results directory (the scan_id=... directory Scout writes) or a folder containing several such directories. Each scan directory must contain a _scan.json spec and at least one per-scanner .parquet file (_summary.json is uploaded too if present). All the scans in one import land under a single fresh, imported--prefixed scan run, each with a freshly-generated scan id, so they never collide with existing warehouse scans. The scanned transcripts must already be in the warehouse: Hawk derives the models that gate access (the scanner models, including models the scanners' recorded usage shows they called, plus the models of the scanned transcripts' source eval sets, matching what a native hawk scan run over those eval sets would require) and refuses to import if any scanned transcript can't be resolved, or if you lack permission for those models.

Every model a scanner actually called must resolve to an access group, including models it called without naming them in the scan config: finalize reads them from each parquet's scan_model_usage column and from _summary.json. Unregistered hardcoded* and mockllm/* test names use the public access-group fallback; registered matches retain their registry restrictions. Other unknown models are rejected with an "Unknown models in scan" error that lists the usage-only models. Editing the scan spec cannot remove them; register the model with Middleman, or re-run the scan without it.

Human-in-the-Loop Approvals

For sensitive workloads you can require a human decision before the agent's tool calls execute. Two config pieces work together:

  • approval — a chain of Inspect approvers, matched top-down against each tool call. Approvers are resolved by registry name: Inspect's built-ins (human, auto) work out of the box, and packages listed in packages can register their own.
  • acp_server — a loopback TCP port (1–65535, except 8090, which the runner's health check uses) that starts Inspect's ACP server inside the eval, so a human approver parks the tool call until someone attaches and answers, instead of the eval crashing or hanging on stdin.

A minimal end-to-end test config (a one-sample game where every tool call needs approval):

acp_server: 4444
approval_timeout_minutes: 60

approval:
  approvers:
    - name: human
      tools: ["*"]

tasks:
  - package: inspect-test-utils==1.10.0
    name: inspect_test_utils
    items:
      - name: guess_number_keep_guessing
        args: { sample_count: 1, target: "3" }

models:
  - package: openai
    name: openai
    items:
      - name: gpt-4o-mini

limit: 1

The flow:

hawk eval-set approval-test.yaml   # submit; the first tool call parks
hawk watch                         # the sample shows awaiting_approval (the run stays "running"); --json reports pending_interactions
hawk acp                           # bridge through the relay, open the `inspect acp` TUI

hawk acp defaults to the last job you launched from this machine; pass an eval-set id to answer a different run. In a sharded eval set, each worker has its own ACP server: pass --shard K to reach worker K, since plain hawk acp reaches only the newest worker. It shells out to inspect acp, so you need an inspect on your PATH from an environment that has ACP support — the inspect-ai that ships with hawk[cli] does. If that binary is missing or broken, hawk acp says so and you can bridge without launching a client: hawk acp --no-launch, then point your own inspect acp --server <address> at the printed address.

In the TUI, pick the session and answer each request: approve executes the call, reject refuses just that call (the agent continues and may try something else), and terminate ends the sample gracefully — it is scored with the work done so far and recorded with a SampleLimitEvent, not an error.

Chain semantics: each tool call is handled by the first entry whose tools pattern matches; an approver that returns escalate hands the call to the next matching entry, and if every approver escalates the call is rejected. Narrow the tools patterns (they are prefix matches, e.g. "bash*") so humans only see genuinely risky calls — that is the safest way to cut approval volume, because a call that matches no policy never needed a decision in the first place.

An auto-approving approver is a noise filter, not a safety boundary

Any approver that returns approve decides that a tool call runs with nobody having seen it. Judging a shell command safe by inspecting it is unreliable: an allowlist keyed on program names has been shown to pass commands that write and then execute a file, and narrowing the character filter does not fix it. Put human (or a model-based monitor) where the safety decision actually matters, and treat anything in front of it as a convenience that only ever handles calls you would have approved anyway.

Local runs honor both settings too: hawk local eval-set starts the ACP server on the configured loopback port on your own machine, so an ACP client connects to it directly and no relay is involved.

approval_timeout_minutes bounds how long a parked approval waits before it is automatically denied — by default it is null, and a parked approval waits until someone answers it, unless another limit such as a configured time_limit (which keeps counting while the sample is parked) ends the sample first. It requires acp_server. A timed-out approval rejects that one tool call; the sample keeps running.

hawk acp requires the deployment's attach relay (relayEnabled, on by default). While approvals are parked the sample holds its sandbox, so watch pending_interactions, and answer parked approvals within hawk:expectedLongestRunDays (30 days by default): that is as long as Hawk ensures a run's credentials last, so a sample resumed after it may fail.

Budget for the volume: a model can emit several tool calls in one turn, and each one parks separately — a single turn has been observed producing ten simultaneous approvals. Narrow tools patterns accordingly, and expect a burst rather than a steady trickle.

Monitor Model Preferences

Hosted evals can provide an ordered list of models for a model-based approver:

approval:
  approvers:
    - name: metr_agents/action_monitor
      tools: ["*"]
      model_preferences:
        - anthropic/example-monitor
        - openai/example-monitor
      args:
        fallback_models: []

Use provider-qualified model names registered with your deployment, and include the approver package and provider SDKs in your config's packages. Hawk passes the selected model as the approver's model argument and adds it to additional_models.

For each task × agent × primary-model combination, Hawk uses the first live model you can read and call that passes the existing model read policy, including the same-provider rule for private models, trying first the models that can also read the eval's inputs, and on a resume what its earlier runs read. Compatibility otherwise considers only the primary model; content shared through other roles needs separate review. Existing task-level approval policies take precedence. Omitting model_preferences keeps existing approval behavior; it does not enable monitoring automatically.

This requires explicit remote models and hosted submission; hawk local eval-set cannot resolve preferences. Mock and model-free primaries (mockllm, hardcoded, none) are rejected, including when mixed with remote primaries. Every listed candidate must exist and have metadata readable by the submitter; an unknown or unreadable candidate rejects the submission even if another candidate could work. Valid candidates that cannot be called or are incompatible with the primary model are skipped. If any declared primary model has no eligible candidate, submission fails. Each submission and resume fetches fresh Middleman metadata for selection; a lookup failure rejects the submission.

Set args.fallback_models: [] and omit args.model, args.chains, and the monitor model role, including task-defined roles. These settings could otherwise replace the selected model or send a refusal to an unchecked fallback. The preference list chooses one model at submission time; it is not a runtime fallback chain.

The approval chain still controls blocking. For log-only monitoring with metr_agents/action_monitor, append name: auto, tools: ["*"], and args: {decision: approve} after the monitor. Inspect retains the monitor's approval events and metadata. This also approves calls the monitor could not score; see Monitor failure policy.

See monitor-preferences.eval-set.yaml for a configuration template.

Running Human Evaluations

For evaluations driven by a human instead of an LLM agent, Hawk provisions a sandbox and exposes it via SSH through the shared jumphost. config.yaml can be any eval-set YAML — the server swaps in the configured human-agent solver, clamps epochs=1 / limit=1, and defaults runner.cleanup to false so the sandbox sticks around between SSH sessions. To set args on the installed agent (e.g., user, record_session), add a human_eval.agent_args block to your config; it's shallow-merged onto the agent. Pass --no-rewrite to keep your config's agents/solvers block untouched (the SSH key is still injected on every solver). The sandbox's network comes from the task's sandbox definition and is deny-by-default, so a baseline has no internet unless the task grants it; see the human guide.

# 1. Register the human and their SSH public key (one-time)
hawk human register --name jane --ssh-key "ssh-ed25519 AAAA..."

# 2. Start the eval — provisions a sandbox and registers jane's key on the jumphost
hawk human eval start config.yaml --human jane

# 3. Get a ready-to-paste SSH command for the sandbox
hawk human eval ssh-command          # uses the last-started eval-set
# — or —
hawk human eval ssh-command <eval-set-id>

ssh-command polls the eval logs for the agent's connection line, confirms whether the sandbox with that logged endpoint is live via the Kubernetes API (refusing outright if that sandbox is confirmed gone or not ready, warning but still printing if that status can't be confirmed), and prints ssh -J ssh-user@<jumphost> <user>@<sandbox-ip> -p <port>. It retains the endpoint from the log rather than replacing it with another sandbox's address. Load your private key into ssh-agent first (ssh-add /path/to/key) — the -J ProxyJump uses the agent for both the jumphost and sandbox hops. Use --timeout SECONDS to bound how long it waits for the sandbox to come up (default 600). See the human-eval guide for the full liveness-check behavior and --skip-verify (which skips only the SSH connectivity probe).

After hawk delete <eval-set-id> (or eval completion), the SSH key is removed from the jumphost and ssh-command refuses subsequent invocations.

Stopping and Deleting

hawk stop interrupts active samples: by default, they are scored with whatever work they've done so far and partial results are written to S3. Use this to end an eval early but keep the partial results. A retained restricted runner kept alive by runner.cleanup: false must be removed with hawk delete JOB_ID; stop does not remove it. Retained runners using user credentials still respond to stop by exiting.

hawk delete kills the job immediately and tears down its Kubernetes resources. Use this when you don't care about partial results and just want the job gone. Logs already written to S3 are kept. It takes either an eval-set ID or a scan-run ID, and confirms the target before tearing anything down. Scripts and other non-interactive callers must pass -y; without a terminal to prompt at, the command refuses rather than reading an answer from redirected stdin. -y also requires the ID to be given explicitly — with no prompt there is nothing to show which job the default resolved to, and that default moves whenever any command is given a job ID, including read-only ones like hawk logs.

hawk purge permanently deletes a job's S3 folder (its logs, transcripts and artifacts) and its warehouse rows. There is no undo. It runs in the background, the job stays listed as deleted, and its ID can't be reused. Run hawk delete first and wait for the pods to stop. An eval set can't be purged while any scan that read it, or was launched to read it, hasn't been purged itself: purge those scans first. That includes a scan that found nothing in it, one whose launch failed, and a hawk scan run --all that read it, so another user's scan can mean asking an admin. An eval set that ran an online scan can't be purged yet. If such a scan appears while the purge runs, the purge stops before deleting any warehouse rows; if it had already erased the logs, purge the scan and run hawk purge again to finish. Imported eval sets and scans (from hawk import or hawk scan import), and scans with no job ID, can't be purged with hawk purge; an operator has to remove them from the warehouse. Purging is off unless the deployment's operator sets hawk:enableJobPurge and turns on the allow_job_purge runtime flag; until then hawk purge is refused with a 403, or a 503 if the API can't read the flag. With the flag off, purges already accepted stop before deleting anything, and an interrupted purge can't be finished until it is back on.

A purge does not erase:

  • the run's model traffic: the LLM proxy's request log keeps its prompts and completions, under that log's own retention, and you can still read them;
  • cached transcript-search results, for up to 24 hours, though the API no longer serves them once the job's folder is gone;
  • the job's metadata rows: the job itself (kept as a record of the purge), its code-access policy and recorded sources, and its execution records;
  • data outside the job's folder, such as sample-edit requests, and copies of its transcripts inside other scans' result files.
hawk stop                  # gracefully stop current eval set (score partial work)
hawk stop --error          # mark samples as errors (will retry if retries are configured)
hawk stop --sample UUID    # stop a single sample

hawk delete                # tear down the current job's Kubernetes resources (logs are kept)
hawk delete JOB_ID         # delete a specific eval set's or scan run's resources
hawk delete JOB_ID -y      # skip the confirmation prompt (required in scripts;
                           # -y always needs the ID spelled out)
hawk purge JOB_ID          # ...and permanently erase its data (irreversible)