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
| Flag | Description |
|---|---|
--quiet | Suppress non-error stderr output for all commands |
--help | Show 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.
# ~/.hpilot/config.yaml or .hpilot/config.yaml
hooks:
before_stage: scripts/user-stage-start.sh
after_stage: scripts/user-stage-finish.sh# hpilot.yaml
hooks:
before_stage: scripts/project-stage-start.sh
after_stage: nullResolution is independent for each phase:
| Pipeline phase | Effective command |
|---|---|
| Omitted | Global command, when configured |
| Non-empty string | Pipeline command replaces the global command |
Explicit null | Disabled, 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.
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, andHPILOT_STAGE_EXECUTORHPILOT_STAGE_ATTEMPT,HPILOT_STAGE_MAX_RETRIES,HPILOT_STAGE_ITERATION, andHPILOT_STAGE_MAX_ITERATIONSHPILOT_STAGE_SUCCESS,HPILOT_STAGE_EXIT_CODE, andHPILOT_STAGE_ERRORHPILOT_WORKSPACE_ROOTandHPILOT_OBJECTIVEHPILOT_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.
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 replayharnesses 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:
| Setting | Default | Purpose |
|---|---|---|
transport | unix | Select unix or tcp; saved host/port values alone do not opt into TCP |
socket | .hpilot/run/daemon.sock | Unix socket path; relative paths resolve against the canonical daemon workspace |
host | 127.0.0.1 | TCP interface, used only when TCP is selected or a TCP CLI flag is supplied |
port | 8765 | TCP port, used only when TCP is selected or a TCP CLI flag is supplied (must be an integer, not a string) |
reconnect_ttl_seconds | 300.0 | Seconds 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_buffer | 1000 | Maximum 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:
usage_recording:
enabled: falseSee 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.
| Setting | Default | Purpose |
|---|---|---|
enabled | false | Enable usage reporting |
endpoint | "" | Elasticsearch endpoint URL (e.g., https://elasticsearch.example.com) |
api_key | "" | Elasticsearch API key for authentication |
index | hpilot-usage | Elasticsearch 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.
usage_reporting:
enabled: true
endpoint: https://elasticsearch.example.com
api_key: your-api-key
index: hpilot-usage
user: alice@example.comHarness Configuration and Notes
For harness-specific prerequisites, authentication, configuration, and permission enforcement, consult the corresponding guide:
- Claude Code Harness Guide
- Cursor Harness Guide
- OpenCode Harness Guide
- Antigravity Harness Guide
- Codex Harness 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:
harness: cursor
harnesses:
cursor:
api_key: your-cursor-api-keyWhen .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 asimple6-stage pipeline withPlan -> Review Plan -> Implement -> Review Code -> Review Docs -> Verify.hpilot init --template speckit: Creates aspeckit-integrated pipeline.--force: Required to explicitly replace an existinghpilot.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:
- Positional argument —
hpilot run "Your task description" - stdin —
printf "Your task" | hpilot run - Config-driven promptless execution — Command stages require no objective. Harness-backed stages are also promptless when their configured
promptdoes not reference{objective}. - 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.
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:
# 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-guidanceto 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.