Skip to content

Configuration Reference ​

Audience: Users — Pipeline operators and configuration authors.

hpilot is configured with a hpilot.yaml file. Global harness, verifier, and lifecycle-hook defaults reside in ~/.hpilot/config.yaml.

Global Flags ​

FlagDescription
--quietSuppress non-error stderr output for all commands
--helpShow help message and exit

Global Configuration (~/.hpilot/config.yaml) ​

The global config file is created with 0o600 permissions (owner read/write only) to protect API keys and other sensitive credentials from being world-readable.

Manage the default harness in the active global config with hpilot use <harness>. Supported: claude, codex, opencode, cursor, antigravity, and mock. When a workspace-local config exists, the command updates that file rather than the home config.

The llm section is optional for configuration loading and daemon startup, so hpilot serve can remain available without verifier credentials. A submitted or standalone task whose effective slice contains a non-contract agent stage fails task preflight when llm.api_key is absent; this task failure does not stop the daemon. Contract-enabled agent stages validate their result artifacts locally, and command stages use their exit status, so contract-only and command-only slices do not require llm. The selected harness may still require its own credentials independent of this setting.

Stage executors ​

Use prompt as the preferred spelling for an harness-backed stage. The legacy prompt_template spelling remains supported and resolves to the same prompt. Do not define both keys, including null-valued combinations.

Stage names may contain normal text and spaces. They must not be . or .. and must not contain path separators or control characters because hpilot uses them in generated artifact, backup, prompt, and log paths.

Use command for a non-empty trusted shell string. A command stage cannot also define agent-only prompt, contract, iteration, artifact-hook, or read-only fields. It may define max_retries, next_stage, cleanup, and backup_artifacts. A next_stage route must not create a direct or indirect routing cycle that includes a command stage because command stages cannot declare an iteration limit.

Command-only effective slices are promptless and do not resolve or construct a default coding harness. They need no harness executable. Mixed pipelines keep normal harness selection for their agent stages.

Pipeline lifecycle hooks ​

The plural hooks mapping accepts before_stage and after_stage in both the active global configuration and root of hpilot.yaml. Global hooks are user-level defaults. Pipeline values retain whether each phase was omitted, set to a command, or explicitly set to null.

yaml
# ~/.hpilot/config.yaml or .hpilot/config.yaml
hooks:
  before_stage: scripts/user-stage-start.sh
  after_stage: scripts/user-stage-finish.sh
yaml
# hpilot.yaml
hooks:
  before_stage: scripts/project-stage-start.sh
  after_stage: null

Resolution is independent for each phase:

Pipeline phaseEffective command
OmittedGlobal command, when configured
Non-empty stringPipeline command replaces the global command
Explicit nullDisabled, even when globally configured

An omitted, empty, or whole-mapping null pipeline hooks section configures no overrides and therefore inherits available global defaults. The same shapes in global configuration supply no defaults. Commands never chain: at most one command runs for each phase.

At either surface, hooks must be a mapping or null, keys must be strings, and the only supported fields are before_stage and after_stage. Phase values must be non-empty strings or null; whitespace-only strings and other types are rejected. Command text is passed unchanged to the shell, so braces and text that resembles a placeholder remain literal.

Global serialization emits hooks only when at least one command is present and omits absent phases. Running hpilot use <harness> preserves these commands unchanged. Do not place lifecycle fields on an individual stage. The root verifier mapping remains separate from plural lifecycle hooks.

Verifier configuration ​

Use verifier: {} in hpilot.yaml when explicitly documenting model-assisted post-run verification for the pipeline. Credentials and endpoint settings remain in ~/.hpilot/config.yaml under llm; placing api_endpoint, api_key, or model inside verifier is rejected. If llm.api_key is omitted, a task with an effective non-contract agent stage fails preflight while hpilot serve continues running.

yaml
verifier: {}

The former singular hook: key has been removed. Rename it to verifier:. Plural hooks: remains the lifecycle-command feature documented above.

hpilot adds these variables to both hook phases:

  • HPILOT_HOOK_PHASE, HPILOT_STAGE_NAME, and HPILOT_STAGE_EXECUTOR
  • HPILOT_STAGE_ATTEMPT, HPILOT_STAGE_MAX_RETRIES, HPILOT_STAGE_ITERATION, and HPILOT_STAGE_MAX_ITERATIONS
  • HPILOT_STAGE_SUCCESS, HPILOT_STAGE_EXIT_CODE, and HPILOT_STAGE_ERROR
  • HPILOT_WORKSPACE_ROOT and HPILOT_OBJECTIVE
  • HPILOT_ROUTED_CONTEXT_JSON

HPILOT_ROUTED_CONTEXT_JSON is a JSON object. Its keys are routed context names and its values use hpilot's existing string representation. It is {} when no routed context is available. Before-stage result variables are empty. After-stage success is true or false; exit code and error remain empty when unavailable.

Hooks execute from the workspace once per attempt and routed visit. Retries increment attempt while retaining the visit's iteration_count. Cleanup runs before the before hook. The after hook runs after the final stage result but before backup, completion, context injection, or routing.

Pipeline lifecycle hooks execute trusted shell commands and inherit the user environment. hpilot's variables override inherited values with the same names. Hooks are not sandboxed and may repeat after failures. Keep them idempotent and put stage-selective behavior inside the script. See the migration example when updating a placeholder-based hook.

yaml
harness: claude
llm:
  api_key: your-api-key
  base_url: https://api.openai.com/v1 # Optional
  model: gpt-4o                     # Optional
mcp:
  client_id: hpilot-workspace            # Optional; required with client_secret when MCP is enabled
  client_secret: your-high-entropy-secret    # Optional; required with client_id when MCP is enabled
harnesses:
  cursor:
    api_key: your-cursor-api-key    # Required when Cursor is selected
server:
  transport: unix       # Default; use tcp only for an explicit TCP deployment
  socket: .hpilot/run/daemon.sock  # Relative to the canonical daemon workspace
  host: 127.0.0.1       # Used only by TCP
  port: 8765             # Used only by TCP
  reconnect_ttl_seconds: 300.0   # How long completed/disconnected tasks are retained for resume
  max_event_buffer: 1000        # Maximum events buffered per task for replay

harnesses is the only credential-block key. If an existing config still has the legacy top-level agents: key, rename it to harnesses:; hpilot rejects the old key and reports both names so the migration is explicit.

Server Settings ​

The server block controls the hpilot serve daemon:

SettingDefaultPurpose
transportunixSelect unix or tcp; saved host/port values alone do not opt into TCP
socket.hpilot/run/daemon.sockUnix socket path; relative paths resolve against the canonical daemon workspace
host127.0.0.1TCP interface, used only when TCP is selected or a TCP CLI flag is supplied
port8765TCP port, used only when TCP is selected or a TCP CLI flag is supplied (must be an integer, not a string)
reconnect_ttl_seconds300.0Seconds a task is kept after the last activity before cleanup; also bounds how long a disconnected client can resume (must be a number, not a string)
max_event_buffer1000Maximum server events stored per task for resume replay; oldest events are evicted FIFO when the cap is hit (must be an integer, not a string)

--socket PATH selects Unix and overrides configured transport/socket. Supplying --host or --port selects TCP and takes the omitted counterpart from configuration or 127.0.0.1:8765; combining Unix and TCP flags is rejected. To preserve the former behavior, set server.transport: tcp or pass hpilot serve --host 127.0.0.1 --port 8765.

The optional OAuth-protected workspace MCP listener is controlled by hpilot serve command-line flags rather than the server configuration block. Its fixed confidential OAuth client comes from mcp.client_id and mcp.client_secret in ~/.hpilot/config.yaml. Unlike other active global settings, these values never come from workspace-local .hpilot/config.yaml, environment variables, or command-line arguments, which keeps the command-execution credentials out of project configuration and process arguments. Remote deployments also set the canonical HTTPS resource and issuer origin with --mcp-public-url. See OAuth-Protected Workspace MCP Server for OAuth discovery, automatic approval, proxy routing, and ChatGPT and Gemini Spark setup.

Workspace-Local Config Override ​

A .hpilot/config.yaml file in the current working directory completely replaces ~/.hpilot/config.yaml for normal runtime settings when present. Settings including usage_recording and usage_reporting come from the workspace-local file. The MCP client ID and secret are the exception: they come only from the home config. Pipeline configuration (hpilot.yaml) has no CWD override.

This precedence is honored on every stage-attempt reload, not just at task start. The files are not merged: a workspace-local file without hooks supplies no global hook defaults even when the home file defines them. Editing or removing the workspace-local file mid-run takes effect at the next attempt. If the workspace-local file is removed during a run, the next reload resolves ~/.hpilot/config.yaml without operator action. See Runtime and Daemon — Per-Stage Config Reload for full reload behavior.

This is useful for teams that need project-specific verifier credentials or model overrides without modifying the global config.

Usage Reporting ​

Local task and stage-attempt accounting is enabled by default. Disable new writes without removing or disabling queries:

yaml
usage_recording:
  enabled: false

See Local Usage Metrics for stored fields, privacy, filtering, date, grouping, and coverage behavior.

The usage_reporting block configures optional per-stage usage telemetry to an Elasticsearch endpoint. Reporting is disabled by default and never blocks pipeline success — failures are logged as warnings.

SettingDefaultPurpose
enabledfalseEnable usage reporting
endpoint""Elasticsearch endpoint URL (e.g., https://elasticsearch.example.com)
api_key""Elasticsearch API key for authentication
indexhpilot-usageElasticsearch index/target for documents
user(local username)Optional user identity sent in each usage document; when omitted, hpilot uses the local system account name

When enabled, hpilot sends one best-effort Elasticsearch request per finalized stage attempt. The remote event is built from the same normalized record as local accounting, including identity, workspace, executor, harness, model, model effort, status, duration, and all available token fields. Failed and interrupted attempts are included. Remote and local failures remain independent and never fail a pipeline stage.

yaml
usage_reporting:
  enabled: true
  endpoint: https://elasticsearch.example.com
  api_key: your-api-key
  index: hpilot-usage
  user: alice@example.com

Harness Configuration and Notes ​

For harness-specific prerequisites, authentication, configuration, and permission enforcement, consult the corresponding guide:

Antigravity Notes ​

The antigravity adapter requires agy acp on PATH with ACP v1, session resume or load, and a completed login. hpilot selects the configured model and effort from the choices the session advertises, in that order. The child’s --dangerously-skip-permissions flag applies only to the current process. By default, Antigravity turns can run indefinitely. To set a deadline for each turn, set HPILOT_ANTIGRAVITY_PRINT_TIMEOUT to a positive whole number of seconds, up to 86,400 (24 hours).

Cursor Credentials ​

The Cursor adapter reads its API key only from harnesses.cursor.api_key in the active hpilot config:

yaml
harness: cursor
harnesses:
  cursor:
    api_key: your-cursor-api-key

When .hpilot/config.yaml exists in the workspace, it replaces the home config, so the Cursor key must be present there. Environment variables and Cursor CLI login state are not fallback credential sources.

Changing the default harness with hpilot use <harness> updates only harness. It preserves model_effort, stage_overrides, the harnesses map (including harnesses.cursor.api_key), mcp.client_id, mcp.client_secret, verifier settings, server settings, and usage settings.

Scaffolding (hpilot init) ​

Initialize a project scaffold. Overwrite protection is active by default.

  • hpilot init: Creates a simple 6-stage pipeline with Plan -> Review Plan -> Implement -> Review Code -> Review Docs -> Verify.
  • hpilot init --template speckit: Creates a speckit-integrated pipeline.
  • --force: Required to explicitly replace an existing hpilot.yaml.

Running the Pipeline (hpilot run) ​

The positional prompt argument (or stdin) provides the {objective} for stage templates.

Prompt Resolution Priority ​

When running hpilot run or hpilot submit, the task prompt is resolved with the following priority:

  1. Positional argument — hpilot run "Your task description"
  2. stdin — printf "Your task" | hpilot run
  3. Config-driven promptless execution — Command stages require no objective. Harness-backed stages are also promptless when their configured prompt does not reference {objective}.
  4. Error — If no prompt is provided and any stage still requires {objective}, the command exits with an error listing the stages that need a prompt.

If a positional prompt argument is present, stdin is ignored even when piped.

When --path <dir> is provided with hpilot submit, positional prompts and stdin are both bypassed — each .md file in the directory supplies a prompt. --path and the positional prompt are mutually exclusive. See Runtime and Daemon — Batch Submit for full documentation.

bash
hpilot run "Implement feature X"
hpilot run --config custom.yaml              # Use specific config
hpilot run --start-from "Implement"          # Start fresh at this stage
hpilot run --start-from "Implement" --resume # Resume from last captured session
hpilot run --end-after "Review Code"         # Run up to and including this stage, then stop (daemon tasks can update or clear the boundary)
hpilot run --end-before "Verify"             # Stop before this stage (daemon tasks can update or clear the boundary)

The standalone run command keeps its boundary for that invocation. For daemon tasks, use hpilot end --clear to remove both boundary types; see Runtime and Daemon for task resolution and batch behavior.

Self-Contained Config Flow Example ​

If all active harness-backed stages define a self-contained prompt, or the effective slice contains only commands, the positional prompt may be omitted:

bash
# Using stage templates (standalone)
hpilot run --config self-contained.yaml

# Using stage templates (daemon)
hpilot submit --config self-contained.yaml --start-from "Plan"

# Overriding with stdin (standalone)
printf 'hotfix retry handling\n' | hpilot run --config self-contained.yaml

# Overriding with positional prompt (standalone)
hpilot run "ship the retry fix" --config self-contained.yaml

# Overriding with positional prompt (daemon)
hpilot submit "ship the retry fix" --config self-contained.yaml --start-from "Implement"

Diagnostics & Validation ​

hpilot doctor (Readiness Checks) ​

Validates ~/.hpilot/config.yaml connectivity and credentials. It also checks that the selected harness passes its preflight requirements, including SDK importability or CLI availability, platform compatibility, authentication, structural effort-channel support, and verifier config where applicable.

  • Doctor: verifier ready — Verifier credentials are valid.
  • Doctor: harness '<name>' ready — The adapter is structurally ready; a harness or provider can still reject model-specific settings at launch.
  • Doctor: verifier blocked — Local configuration error (e.g., missing API key).
  • Doctor: verifier needs attention — Remote rejection (e.g., 401 Unauthorized).
  • Doctor: harness '<name>' blocked — Harness preflight failed (for example, missing runtime, effort configured for an adapter without an effort channel, unsupported platform, or missing auth).

hpilot validate (Config Safety) ​

Checks hpilot.yaml for route safety and prompt synchronization. It exits 0 on success and 2 on validation failure with an actionable message naming the offending stage and field, consistent with the pipeline configuration-error exit code; --show-guidance does not change the exit code.

  • Use --show-guidance to preview the effective global instructions and the exact contract instructions generated for the agent.

Stage Configuration ​

Detailed stage fields and runtime/iteration examples are in the Stage Configuration Reference. Established anchors below remain navigation entry points.

Global Harness and Per-Stage Runtime Overrides ​

See Global Harness and Per-Stage Runtime Overrides.

Self-Refining Review Loop Example ​

See Self-Refining Review Loop Example.

Stage Field: backup_artifacts ​

See Stage Field: backup_artifacts.

Stage Field: keep_artifacts ​

See Stage Field: keep_artifacts.

Stage Field: cleanup ​

See Stage Field: cleanup.

Stage Fields: max_iterations and max_iterations_next_stage ​

See Stage Fields: max_iterations and max_iterations_next_stage.

Stage Field: reset_iterations ​

See Stage Field: reset_iterations.

Global Instructions: instructions ​

See Global Instructions: instructions.

Global Config: disabled_skills ​

See Global Config: disabled_skills.

Stage Config: read_only_paths ​

See Stage Config: read_only_paths.