Reference for error codes and messages in CMN tools.

Hypha Errors

Pipeline Error Codes

These codes correspond to stages in the visitor resolution pipeline (sense/taste/spawn/grow/absorb). Each error includes a trace field in the final JSON event showing how far the operation progressed before failure.

CodeStageCauseResolution
invalid_uriURI parseMalformed CMN URICheck URI syntax: cmn://domain/b3.<hash>
key_fetch_failedKey fetchcmn.json fetch or public key extraction failedCheck domain’s cmn.json, check network
cmn_failedcmn.jsoncmn.json endpoint extraction failedCheck domain’s cmn.json, check network
manifest_failedManifestMycelium or spore manifest fetch failedVerify URI, domain may have removed it
sig_failedVerificationEd25519 signature invalidContact publisher, possible tampering
hash_mismatchHash checkContent doesn’t match URI hashRe-fetch, possible corruption
spore_not_foundCatalogSpore not in mycelium catalogVerify hash, spore may have been removed
fetch_failedDownloadContent download (HTTPS/git) failedCheck network, try later

Command-Specific Error Codes

CodeCauseResolution
DIR_EXISTSTarget directory already existsRemove directory first
dir_errorDirectory creation failedCheck filesystem permissions
spawn_errorSpawn git/archive operation failedCheck git URL, disk space
grow_errorGrow local operation failedCheck git state, commit changes first
LOCAL_MODIFIEDLocal files modified since spawnMerge manually using cached old/new content paths shown in hint
NO_SPAWN_REMOTEGit repo has no spawn remote, cannot auto-updateMerge manually using cached old/new content paths shown in hint
GIT_URL_CHANGEDGit repository URL changed since spawnRe-spawn with new repository
REPO_IDENTITY_ERRRoot commit mismatchRepository was recreated, re-spawn
bond_errorBond operation failedCheck spore.core.json, disk space
bond_spec_read_failedhatch bond sync couldn’t read --spec (file or stdin)Check the path exists and is readable, or that stdin is being piped
bond_spec_invalidhatch bond sync --spec is not valid JSON, or an entry is missing idFix the spec: a JSON array of {id, reason?, with?, uri?} objects
missing_domainhatch bond sync needs --domain to resolve a spec entry’s uriPass --domain (and --site-path for a non-default site), or give the entry an explicit uri
bond_uri_unresolvedhatch bond sync couldn’t resolve a spec entry’s uri: not deployed, and no sibling spore.core.json for the dry-run fallbackRelease the dependency first, or give the entry an explicit uri
absorb_errorAbsorb local operation failedCheck permissions, disk space
synapse_errorSynapse query failedCheck Synapse URL and network
NOT_TASTEDSpore has not been tastedRun hypha taste <uri>, review, record verdict
TOXICSpore tasted as toxicDo not proceed; choose an alternative

Publisher Error Codes

CodeCauseResolution
init_errorFailed to initialize siteCheck permissions
NO_SITESite directory not foundRun hypha mycelium root --domain domain
NO_SPOREspore.core.json not foundRun hypha hatch first
validation_errorspore.core.json validation failedFix required fields
sign_errorFailed to sign manifestCheck private key
invalid_argsInvalid command argumentsCheck required flags
write_errorFailed to write fileCheck permissions

Runtime Diagnostic Codes

Non-fatal diagnostic events emitted during operations. These use the same Agent-First Data protocol structure and are written to the runtime stdout event stream.

CodeContextMeaning
CACHE_WARNcapsule/mycelium cacheCache write failed (operation continues)
DOWNLOAD_FAILEDtaste/absorbHTTPS download failed, trying next dist source
CLONE_FAILEDtaste/absorbGit clone failed, trying next dist source
TASTE_DEPtaste –with-depsFetching a dependency
SAVE_WARNspawn/growFailed to save .cmn/spawned-from/spore.json
ABSORB_DISCOVERabsorb –discoverNumber of sources discovered from lineage
ABSORB_FETCHabsorbFetching a source for absorption
SIG_VERIFIEDabsorbSignature verification succeeded
HTTP_OKmycelium serveSuccessful HTTP request
HTTP_ERRORmycelium serveHTTP 500 response
HTTP_NOT_FOUNDmycelium serveHTTP 404 response

Synapse Errors

API Errors

HTTPCodeMessageCause
400INVALID_PROTOCOLInvalid protocol versionProtocol not cmn/1
400INVALID_REQUESTMalformed request bodyFix request JSON
401SIGNATURE_INVALIDSignature verification failedInvalid signature
404NOT_FOUNDResource not foundSpore/domain not indexed
422INVALID_URIInvalid URI formatFix URI syntax
500INTERNAL_ERRORServer errorReport to operator

Pulse-Specific Errors

CodeMessageCause
VERSION_TOO_OLDTimestamp older than cachedMycelium already has newer version
VERSION_CONFLICTSame timestamp, different hashConflicting updates detected
TIMESTAMP_TOO_FAR_IN_FUTURETimestamp too far aheadClock skew exceeds pulse.max_clock_skew (default 300s), check system time

Storage Errors

CodeMessageCause
DB_CONNECTION_FAILEDDatabase unreachableCheck PostgreSQL connection
DB_QUERY_FAILEDQuery execution errorDatabase issue
STORAGE_FULLStorage limit reachedIncrease storage capacity

Error Response Format

Hypha CLI — Error

The nested error.code field contains the specific error code. Parse error.code to branch on error type:

{
  "kind": "error",
  "error": {
    "code": "SIG_FAILED",
    "message": "Core signature verification failed: invalid signature",
    "retryable": false,
    "hint": "read the error field, check hypha --help for the expected input, and retry"
  },
  "trace": {
    "duration_ms": 0
  }
}
{
  "kind": "error",
  "error": {
    "code": "invalid_uri",
    "message": "URI must start with 'cmn://'",
    "retryable": false,
    "hint": "use a CMN URI in the form cmn://domain or cmn://domain/b3.hash"
  },
  "trace": {
    "duration_ms": 0
  }
}

Hypha CLI — Success with Trace

sense returns a trace field with resolution metadata (key fetch, caching, verification):

{
  "kind": "result",
  "result": { "spore": { "..." : "..." } },
  "trace": {
    "uri": "cmn://cmn.dev/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2",
    "cmn": { "resolved": true, "cached": true, "public_key": "ed25519.5XmkQ9vZP8nL3xJdFtR7wNcA6sY2bKgU1eH9pXb4" },
    "verified": { "core_signature": true, "capsule_signature": true }
  }
}

Synapse API — Error

{
  "kind": "error",
  "error": {
    "code": "SIGNATURE_INVALID",
    "message": "Signature verification failed for domain cmn.dev",
    "retryable": false,
    "hint": "verify the signing key and signature before retrying"
  },
  "trace": {
    "storage": "redb"
  }
}

Synapse API — Success

Success responses include a result field with query data and a trace field with internal state:

{
  "kind": "result",
  "result": {
    "query": { "hash": "b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2", "max_depth": 10 },
    "lineage": []
  },
  "trace": {
    "max_depth_reached": false,
    "storage": "redb"
  }
}

Synapse Access Log

Every request produces a protocol-v1 log event. Request fields and optional result/error data live under log; trace merges request metadata with handler-level state.

JSON format (log_format: json):

{
  "kind": "log",
  "log": {
    "method": "GET",
    "path": "/synapse/spore/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2",
    "status_code": 404,
    "error": {
      "code": "NOT_FOUND",
      "message": "Spore not found",
      "retryable": false,
      "hint": "verify the domain/hash and wait for indexing before retrying"
    }
  },
  "trace": {
    "duration_ms": 1
  }
}

Plain format (log_format: plain):

kind=log log.error.code=NOT_FOUND log.error.message="Spore not found" log.error.retryable=false log.method=GET log.path=/synapse/spore/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2 log.status_code=404 trace.duration=1ms

The plain format is generated from the same JSON value using agent_first_data::output_plain (logfmt-style key/value output).

Exit Codes

Hypha CLI exit codes:

CodeMeaning
0Success
1General error
2Invalid arguments
3Network error
4Verification failed
5Git operation failed
6Permission denied
7hatch bond sync --check found drift (structured to_add/to_update/to_remove diff on stdout) — distinct from the general error exit (1) so CI/release pipelines can gate on “bonds are out of sync” specifically

Debugging

Verbose Output

hypha --verbose taste cmn://cmn.dev/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2

Debug Logging

RUST_LOG=debug hypha taste cmn://cmn.dev/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2

Trace Logging

RUST_LOG=trace hypha taste cmn://cmn.dev/b3.3yMR7vZQ9hL2xKJdFtN8wPcB6sY1mXgU4eH5pTa2

Common Issues

“Key fetch failed”

  1. Verify https://yourdomain.com/.well-known/cmn.json is accessible
  2. Check that cmn.json contains a valid public_key field
  3. Ensure HTTPS is properly configured on the domain

“Signature verification failed”

  1. Verify you’re fetching the correct URI
  2. Check if publisher updated their public key in cmn.json
  3. Try fetching from Synapse mirror if available

“Hash mismatch”

  1. Clear cache: hypha cache clean --domain cmn.dev
  2. Re-fetch the spore
  3. Report to publisher if issue persists

“Local files modified” during grow

Grow detected local changes and refused to overwrite. The error hint shows:

Compare the two with diff -r <old>/content/ <new>/content/ and apply changes manually.