.md

Errors

The lint issue kinds, error codes and runtime error strings the reference implementation emits, each with its cause and the fix.

On this page

Lint issues are structured objects from hcpx lint, and runtime errors are the error string of a result envelope with ok: false. Both stay stable within HCP/1.x, so hosts may match on them. Code that handles a failure should start from Error codes, which most failures carry.

Lint issues#

Each issue is { kind, key, message }.

kindkeyCauseFix
missing_surfacesurface.jsonNo manifestAdd surface.json
missing_harnessHARNESS.mdNo Skill fileAdd HARNESS.md
missing_policypolicy.jsonNo Policy fileAdd policy.json
missing_verb<verb_key>Manifest command without a Policy entryAdd the entry
missing_verb<pack_id>policy.surface_id ≠ idMake them equal
extra_verb<verb_key>Policy entry with no manifest commandRemove it or declare the command
missing_stimulus<ref>Trigger without stimuli entryAdd the entry
extra_stimulus<ref>stimuli entry without a triggerRemove or declare
write_stimulus<ref>Trigger whose Policy operation is not readSet it to read; a trigger never writes
invalid_metahcphcp block fails schemaRead the Zod message
invalid_metapack_idhcp.pack_id ≠ idMake them equal
invalid_metaopenapiopenapi adapter without refAdd openapi.url or .path
invalid_metasense_onlysense_only with no triggersDeclare a trigger
bindingwrapwrap adapter without wrap.binAdd wrap.bin
bindingplanecontrol plane with non-mothership BindingSet binding.mode: mothership
wrapverbsWrap pack with neither named commands nor pass_throughDeclare commands
skill<verb_key>The Skill never names a command, or its hot-path table names one the manifest does not declareMake the Skill and the manifest agree
skillpathA host-absolute path in HARNESS.mdUse a relative path or ~/.hcp/…
skillsecretSomething that looks like a credential in HARNESS.mdRemove it and rotate it
skillmcpThe teaching part presents MCP as the install or invoke pathTeach the CLI; mention MCP under Anti-patterns only

The skill rules are the four-face lint that Skill describes. hcpx install fails with lint failed: <messages joined by "; "> when any issue exists.

Error codes#

Most failures from the runtime and the CLI carry a stable code, a readable error, a hint written for an agent and often next, the exact commands to run. Agents should branch on code, never on the message text.

codeMeaningWhat an agent should do
confirm_requiredThe command asks: Policy confirm, access mode manual, or an ask rule, and nothing satisfied it. Nothing ran; preview holds the command, its arguments, and the rendered CLI line, and approval the card and the answers a host may offerWith approvals agent, re-run with confirm=true only if the user approved this exact action with these values, in their request or after seeing preview. With approvals human, ask the user to approve it (approval_id) and run the same command again. Otherwise show preview and wait
missing_argumentA required argument has no valueSupply it; the hint lists every argument
unknown_argumentAn argument name the command does not takeUse the suggested name ("did you mean")
unknown_commandThe pack has no such commandPick from the listed commands
missing_commandhcpx exec <pack> without a commandThe response includes the pack's commands
missing_packhcpx exec without a packRun hcpx commands
unknown_packNo such pack is installedRun a next command: the suggested pack, or hcpx search
not_activatedInstalled but not activatedhcpx activate <pack_id>
not_installedhcpx activate on a pack that is not installedhcpx install first
no_packhcpx install on a path without surface.jsonPoint at the pack directory, or scaffold one
deniedThe Principal lacks a grantStop and tell the user
denied_by_ruleThe user's access rules forbid this commandTell the user; do not reach the same result another way
human_onlyAn access command (approve, reject, mode, allow, ask, deny, rules rm) ran inside an agentShow the user the command; they run it
bad_approvalhcpx approve or reject on an unknown, used, or expired idSee hcpx approvals; ask the agent to run the command again
bad_mode / bad_pattern / project_cannot_allowInvalid access settingsFollow the hint
usageA CLI command is missing a required argumentFollow the hint
bad_argument / bad_args_jsonAn argument is not key=value, or --args is not JSONFix the syntax as the hint shows
no_projectA pack with wrap.workspace.mode: project was called by a runtime that has no project directoryRun it through a local runtime started in the project
bin_not_foundhcpx wrap could not find the CLI on PATHInstall it, or pass its path
wrap_failedhcpx wrap could not write the packPick another --id or --dir

Runtime errors#

Lifecycle#

errorCause
unknown pack <id>pack_id not in the runtime's catalog
pack <id> not activatedExec or connect before activate
cannot activate unknown pack: <id>Activate an id not in the catalog (thrown)
pack <id> is not installedCLI activate of an uninstalled pack (not_installed)
pack <id> is installed but not activatedCLI exec of an installed, inactive pack (not_activated)
not activated: <id> — hcpx activate <id>CLI connect of an unactivated pack
pack not installed: <id>Uninstall of an unknown pack (thrown)
cannot uninstall bootstrap pack hcp-cliUninstall of the bootstrap pack hcp-cli
connect failedDriver connect returned ok: false without a message

Policy and confirm#

errorCause
no policy for <verb_key>Command lacks a Policy entry at exec time
confirm requiredThe command asks and nothing satisfied the ask (confirm_required; see Access)

Authorization#

Each message begins with denied: .

errorCause
denied: privacy.land brain requires project_idLand brain with no project scope
denied: missing verb.exec.read for <pack>.<verb>No matching read grant
denied: missing verb.exec.write for <pack>.<verb>No matching write grant
denied: missing pack.connectConnect without grant
denied: missing pack.installInstall without grant
denied: missing sense.enableSense delivery without grant

Sandbox and adapter#

errorCause
sandbox: bin "<bin>" not allowlistedwrap.bin not in the allow-list (exit 127)
exit <n>Child exited non-zero with empty stderr
<stderr>Child exited non-zero; stderr returned verbatim
adapter <kind> not executable in reference runtimeopenapi or sense_only exec on the reference runtime

SDK construction (thrown)#

MessageCause
local runtime requires packDirsHcp.create() with no packDirs
proprietary-stub requires packs[]Stub runtime without loaded packs
HarnessAgent ai-sdk runtime requires modelHarnessAgent with the ai-sdk runtime and no model

Host intake#

errorCause
non-json cli outputexecVerbViaCli could not parse stdout; raw carries it
no skill for <pack_id>hcp__read_skill for an unknown or unactivated pack

Availability reasons#

When a command's executable is false, its reason is not installed, not activated or missing <capability>.

Roadmap#

The code values above belong to the reference implementation. The specification has no registry of error codes yet, and the Roadmap proposes one for HCP/1.2.