Skip to main content
The harbor tasks command group provides utilities for creating, testing, and managing task definitions.

Commands

harbor tasks init

Initialize a new task directory with templates.

Arguments

string
required
Task name.

Options

Path
Path to tasks directory. Default: . (current directory)
boolean
Do not include pytest test template.
boolean
Do not include solution template.
boolean
Include canary strings in the task files.
boolean
Include standard Terminal Bench metadata fields in task.toml.

Examples

Create a basic task:
Create a task without solution template:
Create with standard metadata:
Create in a specific directory:

Generated Structure

The command generates:

harbor tasks start-env

Start an environment for a task (for interactive development and testing).

Task Options

Path
required
Path to task directory.

Environment Options

EnvironmentType
Environment type to start. Default: docker
string
Import path for custom environment (e.g., module.path:ClassName).
list[string]
Environment kwarg in key=value format. Can be used multiple times.

Setup Options

boolean
Add solution and tests to environment. Default: true
boolean
Start environment in interactive mode. Default: --interactive

Agent Options

string
Agent name to install in the environment.
string
Import path for custom agent (e.g., module.path:ClassName).
string
Model name for the agent (e.g., anthropic/claude-3-5-sonnet-20241022).
list[string]
Additional agent kwarg in the format key=value. Can be set multiple times.

Examples

Start interactive environment:
Start with agent pre-installed:
Start on Daytona:
Start without solution/tests:

harbor tasks check

Run quality checks on a task definition.

Arguments

Path
required
Task name or path to task directory.

Options

string
Claude model name: sonnet, opus, or haiku. Default: sonnet
Path
Path to write JSON quality check results.
Path
Path to a rubric file (.toml, .yaml, .yml, or .json) defining quality criteria. Uses built-in default if not specified.

Examples

Check task quality:
Use a specific model:
Save results to file:
Use custom rubric:

Quality Checks

The command validates:
  • Instruction clarity and completeness
  • Environment setup correctness
  • Test validity and coverage
  • Solution correctness (if present)
  • Metadata completeness
  • Task difficulty appropriateness

harbor tasks debug

Debug task failures and analyze instruction sufficiency.

Arguments

string
required
Task ID to analyze.

Options

string
required
The name of the model to use.
string
Job ID to analyze.
Path
Path to jobs directory. Default: jobs
Path
The path to the tasks directory. Default: tasks
int
Number of failed trials to analyze. Default: 10
Path
Path to write JSON debug analysis results.

Examples

Debug a task:
Analyze a specific job:
Analyze more trials:
Save results:

harbor tasks migrate

Migrate Terminal Bench tasks to Harbor format.
This migration tool is not foolproof and may require manual adjustments. Please review the migrated tasks carefully before use.

Options

Path
required
Path to Terminal Bench task directory or parent directory containing tasks.
Path
required
Path to output directory for Harbor format tasks.
int
Override CPUs for all migrated tasks.
int
Override memory (MB) for all migrated tasks.
int
Override storage (MB) for all migrated tasks.
int
Override GPUs for all migrated tasks.

Examples

Migrate a single task:
Migrate all tasks in a directory:
Migrate with resource overrides:

Task Definition

A Harbor task consists of:

instruction.md

Natural language instructions for the agent. Should be:
  • Clear and unambiguous
  • Self-contained (no external references)
  • Focused on the task objective

task.toml

Task configuration:

environment/Dockerfile

Defines the execution environment:

tests/

Verification scripts: test.sh (required):
test_outputs.py (optional, for pytest):

solution/ (optional)

Reference solution for validation: solve.sh:

See Also