End-to-end correlation id for this eval run. When set, the gateway and downstream services honor it verbatim in logs, Cloud Trace span attributes, async job payloads, and Langfuse trace.id. When omitted, the gateway generates a ULID and echoes it on the response.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Set to "json" to receive {"url": ...} instead of a 307 redirect. Requires presigned=true.
X-Sandbox-Project-Id
header
string | null
no
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
POST /sandbox/harbor/v2/jobs/{job_id}/retry-errored-trials
Batch-refill incomplete pass@k attempts for a terminal datapoint job. Counts result.outcome.trials_detail rows with status=errored and enqueues a new job with pass_at_k=N_errored plus metadata.retry_of / retry_kind=errored_trials. Completed attempts (including reward 0.0) are not retried. Parent archive is immutable; combine scores client-side. By default notifications/deliver/writeback are not copied (pass include_side_effects=true to keep them). Optional Idempotency-Key returns the same child job on repeat. v1: single-agent datapoints only. Requires a durable request snapshot from enqueue. Returns 400 when nothing errored or the snapshot/contract is missing; 409 when the parent is still running.
When true, copy the parent's notifications/deliver/writeback onto the child. Default false so a refill does not re-fire webhooks.
include_timed_out
query
boolean
no
When true, also refill trials that exhausted their budget (hard_stopped / idle_failed). Default false: those trials ran and produced work, so re-running them is a second paid attempt rather than recovery of something lost. Raise the agent timeout on the parent request if they are timing out consistently.
Idempotency-Key
header
string | null
no
X-Sandbox-Project-Id
header
string | null
no
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
POST /sandbox/harbor/v2/jobs/{job_id}/retry-provider-blocked
Enqueue a new job with the parent's original pass_at_k when result.outcome.failure_class=provider (quota/auth/rate-limit). Unlike retry-errored-trials, this re-runs the full k budget with fresh LLM Gateway credentials (ADR 0020). Sets metadata.retry_of / retry_kind=provider_blocked. Optional Idempotency-Key returns the same child job on repeat. v1: single-agent datapoints only.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
One or more agents to run against the same materialized task (max 8).
metadata
object
no
labels
object
no
Consumer tags for analytics (trainer, pass, program, datapoint_id, …). Flat string map, max 20 keys. Not used for task location — use metadata for that.
artifacts
string[] | null
no
sandbox
string | null
no
notifications
object[] | null
no
writeback
HarborTaskWritebackSpec | null
no
deliver
DeliverSpec | null
no
require_verifier_evidence
boolean | null
no
Whether outcome.valid_for_scoring requires the verifier to have produced a machine-readable test report. Defaults to true: a verifier that writes a reward without collecting any test proves nothing, and with no report there is no way to tell the difference. Set false when the task uses a shell verifier you trust and you want to score on its reward alone — the rewards themselves are returned either way, and the job still succeeds. Deployment-wide override: SANDBOX_HARBOR_REQUIRE_VERIFIER_EVIDENCE=false.
verifier_env
object | null
no
Verifier-phase env overrides merged with task.toml [verifier.env]. Applied only during pytest/verifier (Harbor --ve), not the agent phase. Use ${VAR} to forward a worker secret without transmitting its value. Example: {"BROWSECOMP_EXPECTED": "Symphony No. 7"} for a zip whose pytest reads that key at verify time.
gateway_workspace
string | null
no
LLM Gateway workspace id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_project
string | null
no
LLM Gateway project id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_end_user
string | null
no
LLM Gateway end-user identity for Prism-style /eu/{end_user}/ paths. Defaults to opaque label 'sandbox' when omitted.
gateway_request_id
string | null
no
LLM Gateway request id; defaults to the Harbor job id when omitted.
determinism_runs
integer
no
1 (default) runs each agent once. Values > 1 re-run only the first agent that many times in total (same task, same pass_at_k) and return the extra payloads in determinism_rerun_results / determinism_rerun_ctrfs. Such jobs run on the queue path, not the Temporal Pass@N workflow. Default: 1.
aggregate_passk
boolean
no
Add a passk_aggregate block: per-model and cross-model pass rates from the per-trial Harbor rewards. Default: false.
How passk_aggregate.overall_pass_rate combines per-model rates. Default: "avg_across_models".
debug
boolean
no
Persist full stdout/stderr of failing in-pod execs under k8s_exec/ in the job archive (K8s sandbox only). Bundles can grow by tens of MB. Default: false.
expected_output
string | null
no
Deprecated TerminalBench difficulty label; echoed on the result only.
persist_jobs_parent
string | null
no
Deprecated TerminalBench field; ignored. Job artifacts are always persisted and returned as artifact_download_urls.
tenancy
object | null
no
Deprecated TerminalBench field; ignored. Tenant and project come from the caller's credential.
engine
string | null
no
TerminalBench engine selector. Only 'harbor' is supported; 'pier' is 422.
credential_source
string | null
no
TerminalBench credential selector. Only 'registry' (platform keys) is accepted; use gateway_workspace / gateway_project for LLM Gateway egress.
credentials
object | null
no
TerminalBench per-job BYOK block. Not supported; a non-empty value is 422.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
One or more agents to run against the same materialized task (max 8).
metadata
object
no
labels
object
no
Consumer tags for analytics (trainer, pass, program, datapoint_id, …). Flat string map, max 20 keys. Not used for task location — use metadata for that.
artifacts
string[] | null
no
sandbox
string | null
no
notifications
object[] | null
no
writeback
HarborTaskWritebackSpec | null
no
deliver
DeliverSpec | null
no
require_verifier_evidence
boolean | null
no
Whether outcome.valid_for_scoring requires the verifier to have produced a machine-readable test report. Defaults to true: a verifier that writes a reward without collecting any test proves nothing, and with no report there is no way to tell the difference. Set false when the task uses a shell verifier you trust and you want to score on its reward alone — the rewards themselves are returned either way, and the job still succeeds. Deployment-wide override: SANDBOX_HARBOR_REQUIRE_VERIFIER_EVIDENCE=false.
verifier_env
object | null
no
Verifier-phase env overrides merged with task.toml [verifier.env]. Applied only during pytest/verifier (Harbor --ve), not the agent phase. Use ${VAR} to forward a worker secret without transmitting its value. Example: {"BROWSECOMP_EXPECTED": "Symphony No. 7"} for a zip whose pytest reads that key at verify time.
gateway_workspace
string | null
no
LLM Gateway workspace id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_project
string | null
no
LLM Gateway project id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_end_user
string | null
no
LLM Gateway end-user identity for Prism-style /eu/{end_user}/ paths. Defaults to opaque label 'sandbox' when omitted.
gateway_request_id
string | null
no
LLM Gateway request id; defaults to the Harbor job id when omitted.
determinism_runs
integer
no
1 (default) runs each agent once. Values > 1 re-run only the first agent that many times in total (same task, same pass_at_k) and return the extra payloads in determinism_rerun_results / determinism_rerun_ctrfs. Such jobs run on the queue path, not the Temporal Pass@N workflow. Default: 1.
aggregate_passk
boolean
no
Add a passk_aggregate block: per-model and cross-model pass rates from the per-trial Harbor rewards. Default: false.
How passk_aggregate.overall_pass_rate combines per-model rates. Default: "avg_across_models".
debug
boolean
no
Persist full stdout/stderr of failing in-pod execs under k8s_exec/ in the job archive (K8s sandbox only). Bundles can grow by tens of MB. Default: false.
expected_output
string | null
no
Deprecated TerminalBench difficulty label; echoed on the result only.
persist_jobs_parent
string | null
no
Deprecated TerminalBench field; ignored. Job artifacts are always persisted and returned as artifact_download_urls.
tenancy
object | null
no
Deprecated TerminalBench field; ignored. Tenant and project come from the caller's credential.
engine
string | null
no
TerminalBench engine selector. Only 'harbor' is supported; 'pier' is 422.
credential_source
string | null
no
TerminalBench credential selector. Only 'registry' (platform keys) is accepted; use gateway_workspace / gateway_project for LLM Gateway egress.
credentials
object | null
no
TerminalBench per-job BYOK block. Not supported; a non-empty value is 422.
No job with this id in this tenancy. Job records expire, so this is also the answer for a job that has aged out.
—
422
Validation Error
HTTPValidationError
429
The project is already running its maximum number of concurrent jobs. Nothing was enqueued, so retrying after Retry-After is safe and cannot duplicate a run. Use POST /jobs/execute-tasks instead if you would rather the platform queue the work than refuse it: the async route accepts the job with a 202 and lets it wait for capacity.
—
504
The run did not finish inside the synchronous wait. It has not been cancelled — it is still running, and the job id is in the response headers. Poll GET /jobs/{job_id}, or follow GET /jobs/{job_id}/events, rather than resubmitting. Use POST /jobs/execute-tasks instead if your tasks routinely run this long.
Project to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Id
header
string | null
no
Tenant for this request. Must match the credential's tenant when the credential carries one.
No job with this id in this tenancy. Job records expire, so this is also the answer for a job that has aged out.
—
422
Validation Error
HTTPValidationError
429
The project is already running its maximum number of concurrent jobs. Nothing was enqueued, so retrying after Retry-After is safe and cannot duplicate a run. Use POST /jobs/execute-tasks instead if you would rather the platform queue the work than refuse it: the async route accepts the job with a 202 and lets it wait for capacity.
—
504
The run did not finish inside the synchronous wait. It has not been cancelled — it is still running, and the job id is in the response headers. Poll GET /jobs/{job_id}, or follow GET /jobs/{job_id}/events, rather than resubmitting. Use POST /jobs/execute-tasks instead if your tasks routinely run this long.
Logical agent label in the datapoint result. Auto-assigned agent_1, agent_2, … when omitted (TerminalBench behaviour).
harbor_agent
string
yes
Harbor agent id (catalog or factory). TerminalBench alias: agent. TerminalBench agent-level n_concurrent / disable_web / disable_shell_net / disabled_tools_extra are accepted and folded into harbor_extensions.
model
string | null
no
LLM model override
pass_at_k
integer
no
Default: 1.
params
object
no
Per-request agent kwargs forwarded to Harbor as --ak key=value. Merged with harbor_extensions.agent_kwargs (extensions win on conflict).
harbor_extensions
object | null
no
Harbor passthrough: agent_env (--ae), agent_kwargs (--ak), sandbox (-e), n_concurrent, custom_agent_import. When harbor_agent is opencode: opencode_agent sets default_agent in opencode.json (plan | build); opencode_config deep-merges an allowlisted subset of opencode.json (agent, permission, tools, model, small_model, subagent_depth, instructions, command, mcp) — e.g. a custom agent.review subagent.
One or more agents to run against the same materialized task (max 8).
metadata
object
no
labels
object
no
Consumer tags for analytics (trainer, pass, program, datapoint_id, …). Flat string map, max 20 keys. Not used for task location — use metadata for that.
artifacts
string[] | null
no
sandbox
string | null
no
notifications
object[] | null
no
writeback
HarborTaskWritebackSpec | null
no
deliver
DeliverSpec | null
no
require_verifier_evidence
boolean | null
no
Whether outcome.valid_for_scoring requires the verifier to have produced a machine-readable test report. Defaults to true: a verifier that writes a reward without collecting any test proves nothing, and with no report there is no way to tell the difference. Set false when the task uses a shell verifier you trust and you want to score on its reward alone — the rewards themselves are returned either way, and the job still succeeds. Deployment-wide override: SANDBOX_HARBOR_REQUIRE_VERIFIER_EVIDENCE=false.
verifier_env
object | null
no
Verifier-phase env overrides merged with task.toml [verifier.env]. Applied only during pytest/verifier (Harbor --ve), not the agent phase. Use ${VAR} to forward a worker secret without transmitting its value. Example: {"BROWSECOMP_EXPECTED": "Symphony No. 7"} for a zip whose pytest reads that key at verify time.
gateway_workspace
string | null
no
LLM Gateway workspace id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_project
string | null
no
LLM Gateway project id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_end_user
string | null
no
LLM Gateway end-user identity for Prism-style /eu/{end_user}/ paths. Defaults to opaque label 'sandbox' when omitted.
gateway_request_id
string | null
no
LLM Gateway request id; defaults to the Harbor job id when omitted.
determinism_runs
integer
no
1 (default) runs each agent once. Values > 1 re-run only the first agent that many times in total (same task, same pass_at_k) and return the extra payloads in determinism_rerun_results / determinism_rerun_ctrfs. Such jobs run on the queue path, not the Temporal Pass@N workflow. Default: 1.
aggregate_passk
boolean
no
Add a passk_aggregate block: per-model and cross-model pass rates from the per-trial Harbor rewards. Default: false.
How passk_aggregate.overall_pass_rate combines per-model rates. Default: "avg_across_models".
debug
boolean
no
Persist full stdout/stderr of failing in-pod execs under k8s_exec/ in the job archive (K8s sandbox only). Bundles can grow by tens of MB. Default: false.
expected_output
string | null
no
Deprecated TerminalBench difficulty label; echoed on the result only.
persist_jobs_parent
string | null
no
Deprecated TerminalBench field; ignored. Job artifacts are always persisted and returned as artifact_download_urls.
tenancy
object | null
no
Deprecated TerminalBench field; ignored. Tenant and project come from the caller's credential.
engine
string | null
no
TerminalBench engine selector. Only 'harbor' is supported; 'pier' is 422.
credential_source
string | null
no
TerminalBench credential selector. Only 'registry' (platform keys) is accepted; use gateway_workspace / gateway_project for LLM Gateway egress.
credentials
object | null
no
TerminalBench per-job BYOK block. Not supported; a non-empty value is 422.
One or more agents to run against the same materialized task (max 8).
metadata
object
no
labels
object
no
Consumer tags for analytics (trainer, pass, program, datapoint_id, …). Flat string map, max 20 keys. Not used for task location — use metadata for that.
artifacts
string[] | null
no
sandbox
string | null
no
notifications
object[] | null
no
writeback
HarborTaskWritebackSpec | null
no
deliver
DeliverSpec | null
no
require_verifier_evidence
boolean | null
no
Whether outcome.valid_for_scoring requires the verifier to have produced a machine-readable test report. Defaults to true: a verifier that writes a reward without collecting any test proves nothing, and with no report there is no way to tell the difference. Set false when the task uses a shell verifier you trust and you want to score on its reward alone — the rewards themselves are returned either way, and the job still succeeds. Deployment-wide override: SANDBOX_HARBOR_REQUIRE_VERIFIER_EVIDENCE=false.
verifier_env
object | null
no
Verifier-phase env overrides merged with task.toml [verifier.env]. Applied only during pytest/verifier (Harbor --ve), not the agent phase. Use ${VAR} to forward a worker secret without transmitting its value. Example: {"BROWSECOMP_EXPECTED": "Symphony No. 7"} for a zip whose pytest reads that key at verify time.
gateway_workspace
string | null
no
LLM Gateway workspace id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_project
string | null
no
LLM Gateway project id (CTP). Used when SANDBOX_LLM_EGRESS=gateway.
gateway_end_user
string | null
no
LLM Gateway end-user identity for Prism-style /eu/{end_user}/ paths. Defaults to opaque label 'sandbox' when omitted.
gateway_request_id
string | null
no
LLM Gateway request id; defaults to the Harbor job id when omitted.
determinism_runs
integer
no
1 (default) runs each agent once. Values > 1 re-run only the first agent that many times in total (same task, same pass_at_k) and return the extra payloads in determinism_rerun_results / determinism_rerun_ctrfs. Such jobs run on the queue path, not the Temporal Pass@N workflow. Default: 1.
aggregate_passk
boolean
no
Add a passk_aggregate block: per-model and cross-model pass rates from the per-trial Harbor rewards. Default: false.
How passk_aggregate.overall_pass_rate combines per-model rates. Default: "avg_across_models".
debug
boolean
no
Persist full stdout/stderr of failing in-pod execs under k8s_exec/ in the job archive (K8s sandbox only). Bundles can grow by tens of MB. Default: false.
expected_output
string | null
no
Deprecated TerminalBench difficulty label; echoed on the result only.
persist_jobs_parent
string | null
no
Deprecated TerminalBench field; ignored. Job artifacts are always persisted and returned as artifact_download_urls.
tenancy
object | null
no
Deprecated TerminalBench field; ignored. Tenant and project come from the caller's credential.
engine
string | null
no
TerminalBench engine selector. Only 'harbor' is supported; 'pier' is 422.
credential_source
string | null
no
TerminalBench credential selector. Only 'registry' (platform keys) is accepted; use gateway_workspace / gateway_project for LLM Gateway egress.
credentials
object | null
no
TerminalBench per-job BYOK block. Not supported; a non-empty value is 422.