MHS-BNormative

Error Code Registry

OpenMHS 0.9 development draft (wire revision 1)22 min read4,939 words
On this page 30 sections
  1. 1. Structure
  2. 2. Areas and JSON-RPC structural codes
  3. 3. Registry
  4. 3.1 MHS.PROTOCOL.*
  5. 3.2 MHS.SESSION.*
  6. 3.3 MHS.AUTH.*
  7. 3.4 MHS.DEVICE.*
  8. 3.5 MHS.RESOURCE.*
  9. 3.6 MHS.CAPABILITY.*
  10. 3.7 MHS.CONFLICT.*
  11. 3.8 MHS.OUTCOME.*
  12. 3.9 MHS.OPERATION.*
  13. 3.10 MHS.MODE.*
  14. 3.11 MHS.FIDELITY.*
  15. 3.12 MHS.LIMIT.*
  16. 3.13 MHS.EVIDENCE.*
  17. 3.14 MHS.SAFETY.*
  18. 3.15 MHS.ADAPTER.*
  19. 3.16 MHS.REGISTRY.*
  20. 3.17 MHS.COMPOSITION.*
  21. 3.18 MHS.TRANSPORT.*
  22. 3.19 MHS.BRIDGE.*
  23. 3.20 MHS.HOST.*
  24. 3.21 MHS.INTERNAL.*
  25. 3.22 Driver subset
  26. 3.23 Deprecated codes
  27. 4. Cross-reference: codes that are also feature strings
  28. 5. Client handling of unknown codes
  29. 6. Adding a code
  30. 7. Requirements list (this appendix)
FieldValue
DocumentMHS-B (normative; tables generated from errors.json)
StatusOpenMHS 0.9 development draft (wire revision 1)
EditorThe OpenMHS Authors
Layerappendix of the core: the error vocabulary (profiles.md §2)
Normative basecore.md §7; MHS-002 §16
Data contracterrors.json (errors.schema.json); error objects: defs.schema.json error (mhs_code pattern ^MHS\.[A-Z]+\.[A-Z0-9_]+$)

Every failure carries a stable semantic code MHS.<AREA>.<CODE> inside error.data.mhs_code (JSON-RPC errors) or receipt.error.mhs_code (receipt errors). The JSON-RPC numeric code is structural and coarse; the mhs_code is the stable identity that clients, tests and documentation branch on. This appendix is the complete registry of OpenMHS 0.9; the codes belong to wire revision 1 and keep their MHS. prefix. The tables are generated by python3 MHS/sdk/tools/gen_appendices.py from errors.json, which also generates the SDK table in mhs/errors.py; edit the JSON, not the tables.

The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, MAY and OPTIONAL are to be interpreted as described in RFC 2119 and RFC 8174.


1. Structure

text
MHS . SAFETY . INTERLOCK_OPEN
 │      │            └─ CODE: uppercase, underscores, stable forever
 │      └─ AREA: one of the areas in §2
 └─ fixed prefix

ERR-001. A code MUST match ^MHS\.[A-Z]+\.[A-Z0-9_]+$ and MUST be listed in this appendix. An endpoint MUST NOT emit an unregistered code; unknown codes are a conformance failure (the client MAY still display them generically, §5).

ERR-002. A code, once published, MUST NOT change meaning and MUST NOT be reused for a different condition. Retired codes stay in this appendix marked retired (MHS-010 GOV-040).

ERR-003. Every error object MUST carry mhs_code, message and data.retryable; a non-retryable error SHOULD carry data.remediation. A validation error SHOULD carry data.details. The error object schema is defs.schema.json $defs.error (closed: no extra fields).

ERR-004. Clients MUST NOT branch on error.message or on the JSON-RPC numeric code for semantics; they MUST branch on mhs_code (MHS-002 PROTO-040). The numeric code exists for JSON-RPC interoperability and transport tooling.

ERR-005. A receipt's error uses the same object and codes as a JSON-RPC error. A physical rejection is a receipt with status: "rejected" and the same mhs_code a JSON-RPC error would carry (MHS-002 PROTO-028); implementations MUST NOT invent a second vocabulary for receipts.

ERR-006. data.retryable MUST be true only when retrying the identical request cannot duplicate a physical effect and cannot bypass a safety check. MHS.OUTCOME.UNKNOWN, any MHS.SAFETY.* rejection and any gated-permit error MUST be retryable: false.


2. Areas and JSON-RPC structural codes

AreaJSON-RPC codeCodesUsed for
PROTOCOL-32700, -32600, -32601, -32602, -320009Framing, method, parameter, negotiation, batch structure.
SESSION-320116Session lifecycle and grants.
AUTH-320127Authentication, authorisation, transport security.
DEVICE-320137Device identity, readiness, busyness, preconditions.
RESOURCE-320144Resource identity and state validation.
CAPABILITY-320156Class identity, binding and input/output validation.
CONFLICT-320165Idempotency, revision and lease conflicts.
OUTCOME-320173Unknown, timeout and aborted outcomes.
OPERATION-320183Operation handles and cancellation.
MODE-320194Mode declaration, read-only replay, snapshot/restore availability.
FIDELITY-320206Fidelity contract, determinism and replay verification.
LIMIT-320216Rate, size, concurrency and backpressure limits.
EVIDENCE-320229Evidence chain, bundles, signatures and retention.
SAFETY-3201013Envelope, limits, interlocks, permits, e-stop, risk classes.
ADAPTER-320237Adapter manifests, drivers, bridges, shims, licensing.
REGISTRY-320245Registry records, trust, federation.
COMPOSITION-320256Compositions and their children (reserved profile).
TRANSPORT-320264Transport availability and framing failures not covered by PROTOCOL.
BRIDGE-320232Declarative binding execution failures.
HOST-3202728Host-side integration failures: policy, journal, reconciliation and the host evidence ledger (MHS-009).
INTERNAL-326034Server faults; never a client error.

ERR-007. An endpoint MUST use the structural code from this table for the area. Multiple mhs_code values in one area share its structural code; a client that sees an unexpected structural code MUST still read mhs_code and treat the error by area.


3. Registry

Every code has exactly one record in errors.json with the same members: code, area, jsonrpc_code, retryable, status, since, meaning, remediation, driver_subset and, for a deprecated code, replaced_by. Status uses the lifecycle words of capability classes: stable, deprecated (still registered and accepted; emit the replacement), retired or feature (a hello.features disclosure, never an error, §4); active is the pre-0.9 spelling of stable. since is the OpenMHS specification release (spec_version, as MAJOR.MINOR.PATCH) that registered the code with its current meaning; mhs_error_registry versions the registry format and wire revision, not the codes. Remediation is written for the client or agent that receives the error. The Driver column marks the driver subset (§3.22): the only codes a driver or bridge raises itself; every other code is produced by the runtime.

3.1 MHS.PROTOCOL.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.PROTOCOL.PARSE_ERROR-32700nostableThe frame is not valid JSON.Fix framing; send one JSON value per line/message.
MHS.PROTOCOL.INVALID_REQUEST-32600nostableNot a JSON-RPC 2.0 request (missing jsonrpc, method, bad id).Send a valid JSON-RPC request.
MHS.PROTOCOL.METHOD_NOT_FOUND-32601nostableMethod unknown or not implemented by this endpoint/profile.Check hello.features and the profile's method matrix.
MHS.PROTOCOL.INVALID_PARAMS-32602nostableParams missing or malformed (not an input-schema failure — see CAPABILITY.INPUT_INVALID).Check the method reference in MHS-002.
MHS.PROTOCOL.DEADLINE_INVALID-32602nostableBlocking method called without a valid deadline_ms.Supply deadline_ms ≥ 1.
MHS.PROTOCOL.VERSION_UNSUPPORTED-32000nostableNo mutually supported protocol MAJOR.MINOR.Upgrade client or connect to an endpoint supporting your version.
MHS.PROTOCOL.BATCH_NOT_ATOMIC-32000nostableBatch mixes mutations the endpoint cannot order safely.Split the batch or order the mutations as separate requests.
MHS.PROTOCOL.BATCH_TOO_LARGE-32000nostableBatch exceeds the advertised maximum.Split into smaller batches.
MHS.PROTOCOL.UNSUPPORTED_FEATURE-32000nostableA feature the client requested in hello is not implemented.Do not request the feature; re-read hello.features.

3.2 MHS.SESSION.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.SESSION.UNKNOWN-32011nostablesession_id does not exist.Open a session.
MHS.SESSION.EXPIRED-32011yesstableSession passed expires_at.Open a new session; re-read state; re-check permits.
MHS.SESSION.CLOSED-32011nostableSession was closed.Open a new session.
MHS.SESSION.CAPABILITY_NOT_GRANTED-32011nostableCapability not in the session grant.Open a new session requesting the capability (least privilege).
MHS.SESSION.DEVICE_NOT_GRANTED-32011nostableDevice not covered by the session.Open a session including the device.
MHS.SESSION.MODE_MISMATCH-32011nostableRequested mode ≠ device mode.Request the declared mode; never fall back.

3.3 MHS.AUTH.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.AUTH.UNAUTHENTICATED-32012nostableNo or invalid credentials.Authenticate per the endpoint descriptor's auth.
MHS.AUTH.TOKEN_EXPIRED-32012yesstableToken expired.Refresh the token; retry is safe only for reads.
MHS.AUTH.FORBIDDEN-32012nostablePrincipal not allowed to perform this action.Use a principal with the required grant/approval.
MHS.AUTH.SCOPE_INSUFFICIENT-32012nostableToken scope does not cover the endpoint/device/capability.Request a narrower-scope-compatible token.
MHS.AUTH.PRINCIPAL_REQUIRED-32012nostableOperation requires an authenticated principal (human principal for approvals).Authenticate as the required principal kind.
MHS.AUTH.TRANSPORT_INSECURE-32012nostablePlaintext transport to a non-loopback endpoint.Use TLS or a loopback/stdio binding.
MHS.AUTH.HARDWARE_DISABLED-32012nostableHardware operation refused because the deployment policy disallows hardware.Set allow_hardware=true through a trusted operator configuration, or use a simulated endpoint.

3.4 MHS.DEVICE.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.DEVICE.UNKNOWN-32013nostabledevice_id not served by this endpoint.Re-run devices.list.
MHS.DEVICE.BUSY-32013yesstableyesExclusive capability is held by another operation.Wait for the operation to finish or cancel it; retry with backoff.
MHS.DEVICE.OFFLINE-32013yesstableDevice is unreachable or powered down.Bring it online; check the adapter's lifecycle state.
MHS.DEVICE.NOT_READY-32013yesstableDevice initialising; commands not accepted yet.Retry after readiness (hello).
MHS.DEVICE.FAULTED-32013nostableyesDevice reports a fault state.Clear the fault (self-test/reset) before further commands.
MHS.DEVICE.PRECONDITION_UNMET-32013nostableyesA declared physical precondition is false (tip attached, plate present, homed).Satisfy the precondition, then retry.
MHS.DEVICE.FAILED-32013nostableDevice reported a terminal failure unrelated to the request shape.Observe state, recover the device, then re-plan.

3.5 MHS.RESOURCE.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.RESOURCE.UNKNOWN-32014nostableresource_id not present on the device.Re-read devices.get.
MHS.RESOURCE.FIELD_UNKNOWN-32014nostableWrite/read referenced a field not in the resource state schema.Use declared fields only.
MHS.RESOURCE.NOT_WRITABLE-32014nostableResource does not accept writes.Use a capability of verb invoke/write.
MHS.RESOURCE.STATE_INVALID-32014nostableResource state failed its own schema (driver bug).Report to the adapter maintainer; do not retry blindly.

3.6 MHS.CAPABILITY.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.CAPABILITY.UNKNOWN-32015nostableClass id not implemented by this endpoint/device.Re-read the manifest; check class MAJOR.
MHS.CAPABILITY.NOT_BOUND-32015nostableClass known but not bound to this device/resource.Use a bound capability.
MHS.CAPABILITY.KIND_MISMATCH-32015nostableBinding resource kind is not in the class resource_kinds.Adapter defect; report it.
MHS.CAPABILITY.INPUT_INVALID-32015nostableyesInput failed the binding/class JSON Schema.Fix the input; data.details.errors[] lists violations.
MHS.CAPABILITY.OUTPUT_INVALID-32015nostableyesNative result did not produce a valid capability output.Adapter/shim defect; the receipt is failed.
MHS.CAPABILITY.EXPERIMENTAL_PRESENT——featureNot an error: feature marker that an experimental class is bound.Treat experimental classes as unstable.

3.7 MHS.CONFLICT.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.CONFLICT.REVISION-32016nostableexpected_revision ≠ current revision.Read state, re-plan, retry with the current revision.
MHS.CONFLICT.COMMAND_ID_REUSE-32016nostablecommand_id reused with a different input digest.Use a new ULID for a new command.
MHS.CONFLICT.LEASE_CONFLICT-32016yesstableConcurrency lease is held by another operation.Wait for release; do not force.
MHS.CONFLICT.SNAPSHOT_MISMATCH-32016nostableSnapshot does not belong to the target device/instance.Take a snapshot from this device.
MHS.CONFLICT.STATE_HASH-32016nostableDeclared state hash does not recompute from the supplied state document.Recapture the state/snapshot; do not trust the hash.

3.8 MHS.OUTCOME.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.OUTCOME.UNKNOWN-32017nostableEffect may have occurred; outcome not observable.Observe state and the retained receipt; never retry blindly.
MHS.OUTCOME.TIMEOUT-32017nostableyesDeadline exceeded; the effect may be in flight, so observe state first.Observe state; retry only idempotently with the same command_id.
MHS.OUTCOME.ABORTED-32017nostableyesOperation aborted by a device-level event (power loss, watchdog).Recover device state, then re-plan.

3.9 MHS.OPERATION.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.OPERATION.UNKNOWN-32018nostableoperation_id not known (or retention expired).Use operations.list; retain receipts.
MHS.OPERATION.NOT_CANCELLABLE-32018nostableCapability is declared non-cancellable.Use mhs.safety.estop for emergencies.
MHS.OPERATION.ALREADY_FINISHED-32018nostableOperation reached a terminal state.Read the final receipt; no cancellation needed.

3.10 MHS.MODE.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.MODE.READ_ONLY-32019nostableMutation attempted in replay mode.Replay is read-only; use the source endpoint for live actions.
MHS.MODE.SNAPSHOT_UNSUPPORTED-32019nostableDevice does not support snapshots.Check fidelity.snapshot_restore.
MHS.MODE.RESTORE_UNSUPPORTED-32019nostableDevice/snapshot cannot be restored (hardware or unsupported).Use a simulator with snapshot support.
MHS.MODE.SWITCH_FORBIDDEN-32019nostableA mode change was attempted on a live session/device.Open a session on the device with the correct declared mode.

3.11 MHS.FIDELITY.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.FIDELITY.CONTRACT_REQUIRED-32020nostableSimulated/hybrid device lacks a valid fidelity contract.Fix the manifest; a simulator without a contract is CL0 only.
MHS.FIDELITY.SEED_REQUIRED-32020nostableDeterministic replay claimed but no seed supplied on reset.Call world.reset with a seed.
MHS.FIDELITY.REPLAY_DIVERGENCE-32020nostableReplay state hashes diverged from the recording.Treat the replay claim as invalid; investigate the model/seed.
MHS.FIDELITY.GAP_UNDISCLOSED-32020nostableHost/endpoint detected a known gap not shown to the agent.Disclose gaps before actuation.
MHS.FIDELITY.DETERMINISM_UNSUPPORTED-32020nostableRequested determinism-based operation on a statistical/none device.Use repeated trials, not replay equality.
MHS.FIDELITY.VALIDATION_MISSING-32020nostableF3 claimed without a validation record.Provide or downgrade to F2.

3.12 MHS.LIMIT.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.LIMIT.BACKPRESSURE-32021yesstableConsumer cannot keep up; buffering would be unbounded.Slow down, reduce rate_hz, resume from a gap/state read.
MHS.LIMIT.RATE_EXCEEDED-32021yesstableRate limit exceeded.Wait data.details.retry_after_ms; batch or reduce rate.
MHS.LIMIT.SUBSCRIPTION_LIMIT-32021nostableMax concurrent subscriptions reached.Close a subscription first.
MHS.LIMIT.OPERATION_LIMIT-32021nostableMax concurrent operations reached.Finish/cancel operations; wait.
MHS.LIMIT.PAYLOAD_TOO_LARGE-32021nostableFrame/request exceeds the size limit.Reduce payload; use artifact references for large data.
MHS.LIMIT.CONNECTION_LIMIT-32021yesstableToo many concurrent connections.Close idle connections; reconnect with backoff.

3.13 MHS.EVIDENCE.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.EVIDENCE.CHAIN_BROKEN-32022nostableReceipt chain does not recompute.Re-export from the endpoint; investigate tampering.
MHS.EVIDENCE.SIGNATURE_INVALID-32022nostableDetached JWS does not verify or key unknown/revoked.Treat as unsigned; resolve the key in the registry.
MHS.EVIDENCE.TRUNCATED-32022nostableHistory was truncated by retention; marker present.Continue from first_retained_seq; do not assume continuity.
MHS.EVIDENCE.UNKNOWN-32022nostableBundle/endpoint evidence not available.Check include_telemetry/retention; export a smaller range.
MHS.EVIDENCE.EXPORT_TOO_LARGE-32022yesstableExport would exceed the advertised size.Page with since_receipt.
MHS.EVIDENCE.RETENTION_EXCEEDED-32022nostableRequested receipt is outside retention.Use the oldest retained receipt or the truncated marker.
MHS.EVIDENCE.SCHEMA_INVALID-32022nostableA receipt in the evidence bundle violates receipt.schema.json.Re-export from the endpoint and investigate the producer.
MHS.EVIDENCE.SCHEMA_UNAVAILABLE-32022nostableReceipt schemas were unavailable, so schema verification could not complete.Install the MHS schema set and verify again; do not treat as validated.
MHS.EVIDENCE.SIGNATURE_UNVERIFIABLE-32022yesstableA detached signature exists but no key resolver is available.Resolve the signing key through the registry and verify offline.

3.14 MHS.SAFETY.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.SAFETY.INTERLOCK_OPEN-32010nostableyesA required interlock reads open.Close/clear the interlock, then reset if latched.
MHS.SAFETY.ENVELOPE_VIOLATION-32010nostableyesInput outside declared limits/allowed values.Adjust the input to the declared envelope.
MHS.SAFETY.CUMULATIVE_LIMIT-32010nostableCumulative budget (time/travel/volume/dose) exhausted.Wait for the window to reset or obtain a new authorization.
MHS.SAFETY.PERMIT_INVALID-32010nostableMissing, expired, consumed or mismatched permit.Obtain a permit for exactly this input via approval.
MHS.SAFETY.APPROVAL_REQUIRED-32010nostableHuman approval required (R3, R2 policy, human presence).Collect the required approval; retry with permit.
MHS.SAFETY.RESET_REFUSED-32010nostableReset while interlock open/unknown or not latched.Clear interlocks; reset only a latched device.
MHS.SAFETY.SAFE_STATE_UNREACHED-32010nostableyesDevice could not reach the declared safe state in time.Use the physical e-stop; inspect the device.
MHS.SAFETY.ESTOP_ENGAGED-32010nostableyesDevice is e-stopped/latched and refuses actuation.Reset after clearing interlocks; issue a new start command.
MHS.SAFETY.RISK_CLASS_BLOCKED-32010nostableSession/action not permitted at the device's risk class.Use an authorized session with the required approvals.
MHS.SAFETY.NOT_CERTIFIED——featureNot an error: mandatory hello.features disclosure.Display it; never treat MHS as a safety channel.
MHS.SAFETY.ESTOP_UNAVAILABLE-32010nostableThe endpoint exposes no software e-stop path for this device.Use the hardware e-stop; software conformance never replaces it.
MHS.SAFETY.SAFE_STATE-32010nostableA safe-state attempt failed or could not be verified.Inspect safety.status and the bridge stop path.
MHS.SAFETY.LIMITS_UNSET-32010nostableyesA hardware or hybrid write/invoke at risk R1 or above has a numeric input with no declared limit, or a limit declared operator_required that no operator overlay fills.Declare a sourced limit in the driver or have the operator supply site-limits.json; never invent a bound.

3.15 MHS.ADAPTER.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.ADAPTER.MANIFEST_INVALID-32023nostableAdapter manifest/bindings fail schema or reference checks.Fix the manifest; see data.details.errors[].
MHS.ADAPTER.LICENSE_BLOCKED-32023nostableUpstream licence incompatible with use/redistribution.Change use, obtain a licence, or do not use the adapter.
MHS.ADAPTER.SOURCE_UNPINNED-32023nostableRunnable adapter has no pinned source commit.Pin source.commit and regenerate evidence.
MHS.ADAPTER.BRIDGE_UNAVAILABLE-32023yesstableBridge runtime/dependency not installed.Run runtime.install; check the lifecycle.
MHS.ADAPTER.SHIM_FAILED-32023nostableyesShim raised or returned an uninterpretable result.Inspect the redacted message; fix the shim; do not report success.
MHS.ADAPTER.NATIVE_SYMBOL_MISSING-32023nostableDeclared native symbol does not exist at runtime.Fix the binding; mark stability: fragile if private.
MHS.ADAPTER.CONTRACT_MISMATCH-32023nostableServed manifest differs from the adapter declaration.Regenerate from the adapter; report drift.

3.16 MHS.REGISTRY.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.REGISTRY.UNAVAILABLE-32024yesstableRegistry not reachable.Use a local mirror; retry with backoff.
MHS.REGISTRY.RECORD_INVALID-32024nostableRecord fails its schema or reference checks.Fix the record; re-publish.
MHS.REGISTRY.SIGNATURE_INVALID-32024nostableRecord/claim signature invalid or key revoked.Treat as unsigned; resolve keys.
MHS.REGISTRY.FEDERATION_FAILED-32024yesstableA federated peer failed; partial results.Retry if require_all_peers; otherwise use partial results.
MHS.REGISTRY.CLAIM_INVALID-32024nostableClaim does not match its report (subject/profile/level/digest).Re-run the suite and re-issue the claim.

3.17 MHS.COMPOSITION.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.COMPOSITION.UNKNOWN-32025nostablecomposition_ref does not resolve.Publish/serve the composition document.
MHS.COMPOSITION.INVALID-32025nostableComposition document invalid or exceeds session grants.Fix the composition; request the needed grants.
MHS.COMPOSITION.CYCLE-32025nostableComposition includes itself (directly or transitively).Remove the cycle.
MHS.COMPOSITION.CHILD_FAILED-32025nostableA child receipt failed and the composition stops on failure.Inspect the embedded child receipt.
MHS.COMPOSITION.CANCELLED-32025nostableThe composition was cancelled.Inspect child safe-state results.
MHS.COMPOSITION.GRANT_EXCEEDED-32025nostableA child requested a capability beyond the session grants.Open a session with the required grants; compositions cannot escalate.

3.18 MHS.TRANSPORT.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.TRANSPORT.UNAVAILABLE-32026yesstableTransport cannot connect.Check the endpoint address/process; retry with backoff.
MHS.TRANSPORT.CLOSED-32026yesstableConnection closed by the peer.Reconnect; re-read state; never retry unknown outcomes blindly.
MHS.TRANSPORT.TLS_REQUIRED-32026nostableTLS required but not negotiated.Use TLS.
MHS.TRANSPORT.PROTOCOL_ERROR-32026nostableFraming error not covered by MHS.PROTOCOL.* (e.g. SSE corruption).Fix the transport; reconnect.

3.19 MHS.BRIDGE.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.BRIDGE.CAPABILITY_NOT_SUPPORTED-32023nostableThe bridge does not implement the requested capability.Inspect the adapter manifest; declare the capability unsupported or add a mapping.
MHS.BRIDGE.MAPPING_ERROR-32023nostableA declarative binding mapping could not be applied.Fix the binding; unmapped values are never guessed.

3.20 MHS.HOST.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.HOST.CAPABILITY_REQUIRED-32027nostableA capability id is required for this host operation.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.CONFIG_REQUIRED-32027nostableA trusted MHS host configuration file is required.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.DEVICE_AMBIGUOUS-32027nostableThe device is ambiguous; bind it explicitly in policy.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.DEVICE_NOT_ALLOWED-32027nostableThe device is not on the trusted host allow-list.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.DEVICE_NOT_FOUND-32027nostableThe requested device is unknown to the host.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.DEVICE_REQUIRED-32027nostableA device id is required for this host operation.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.ENDPOINT_NOT_ALLOWED-32027nostableThe endpoint is not on the trusted host allow-list.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.ENDPOINT_UNAVAILABLE-32027nostableThe configured endpoint could not be reached.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.EVIDENCE_EXPORT_FAILED-32027nostableThe endpoint evidence bundle could not be exported.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.EVIDENCE_WRITE_FAILED-32027nostableThe durable host evidence store could not be written.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.HARDWARE_GATED-32027nostableThe host requires allow_hardware=true for this hardware call.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.INVALID_ARGUMENT-32027nostableThe host call arguments are invalid.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.NO_CAPABILITIES-32027nostableThe endpoint exposes no callable capability for the host policy.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.NO_ENDPOINTS-32027nostableNo MHS endpoint is configured for the host.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.NO_READ_CAPABILITY-32027nostableThe device exposes no read capability for reconciliation.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.NO_RESOURCES-32027nostableThe device exposes no resource to read.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.OPENAI4S_MISSING-32027nodeprecated → MHS.HOST.ADAPTER_MISSINGDeprecated alias of MHS.HOST.ADAPTER_MISSING (the OpenAI4S host package is not importable).The OpenAI4S host package (its MCP client) is not importable in the host process: install OpenAI4S in that environment or add its source tree to PYTHONPATH, or disable the OpenAI4S integration, then retry. Handle it exactly like MHS.HOST.ADAPTER_MISSING, which replaces this deprecated alias in 0.10.
MHS.HOST.OPERATION_NOT_FOUND-32027nostableThe host operation id is unknown.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.OPERATION_REQUIRED-32027nostableAn operation id is required for reconciliation.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.PROTOCOL_ERROR-32027nostableThe host received an invalid MCP/MHS protocol response.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.READ_FAILED-32027nostableThe host could not read device state for reconciliation.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.RECONCILE_REQUIRED-32027nostableA prior ambiguous outcome must be reconciled before a new command.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.SDK_MISSING-32027nostableThe MHS SDK is not importable in the host environment.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.SESSION_FAILED-32027nostableThe host could not open an MHS session.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.TOOL_ERROR-32027nostableAn MCP tool call failed at the host boundary.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.UNEXPECTED-32027nostableAn unexpected host integration failure occurred.Inspect the host policy/configuration and retry after fixing it.
MHS.HOST.ADAPTER_MISSING-32027nostableThe host-integration package for the configured host is not importable.Install the host integration package in the host environment, or disable the integration.
MHS.HOST.JOURNAL_CORRUPT-32027nostableThe host's durable command journal is unreadable or fails its integrity check; the affected record is never skipped.Repair or restore the journal and reconcile pending commands before issuing new ones.

3.21 MHS.INTERNAL.*

CodeJSON-RPCRetryableStatusDriverMeaningRemediation
MHS.INTERNAL.ERROR-32603nostableUnexpected server fault.Report with the request id; do not retry mutations.
MHS.INTERNAL.NOT_IMPLEMENTED-32603nostableCode path not implemented (endpoint defect).Implement or avoid; report to maintainer.
MHS.INTERNAL.OVERLOADED-32603yesstableServer overloaded (queue full).Retry with backoff.
MHS.INTERNAL.SCHEMA_DRIFT-32603nostableServed schema differs from validated schema.Restart/regenerate endpoint; report adapter defect.

3.22 Driver subset

These 13 codes are the complete vocabulary a driver or bridge raises (mhs.signals.DriverFailed(code, message)); the runtime produces every other code. A driver that cannot classify a native failure raises any other exception, which the runtime reports as MHS.ADAPTER.SHIM_FAILED with a redacted message.

CodeRaised when
MHS.DEVICE.BUSYExclusive capability is held by another operation.
MHS.DEVICE.FAULTEDDevice reports a fault state.
MHS.DEVICE.PRECONDITION_UNMETA declared physical precondition is false (tip attached, plate present, homed).
MHS.CAPABILITY.INPUT_INVALIDInput failed the binding/class JSON Schema.
MHS.CAPABILITY.OUTPUT_INVALIDNative result did not produce a valid capability output.
MHS.OUTCOME.TIMEOUTDeadline exceeded; the effect may be in flight, so observe state first.
MHS.OUTCOME.ABORTEDOperation aborted by a device-level event (power loss, watchdog).
MHS.SAFETY.INTERLOCK_OPENA required interlock reads open.
MHS.SAFETY.ENVELOPE_VIOLATIONInput outside declared limits/allowed values.
MHS.SAFETY.SAFE_STATE_UNREACHEDDevice could not reach the declared safe state in time.
MHS.SAFETY.ESTOP_ENGAGEDDevice is e-stopped/latched and refuses actuation.
MHS.SAFETY.LIMITS_UNSETA hardware or hybrid write/invoke at risk R1 or above has a numeric input with no declared limit, or a limit declared operator_required that no operator overlay fills.
MHS.ADAPTER.SHIM_FAILEDShim raised or returned an uninterpretable result.

3.23 Deprecated codes

A deprecated code stays registered for its deprecation window; endpoints emit the replacement and clients treat both alike.

CodeReplaced by
MHS.HOST.OPENAI4S_MISSINGMHS.HOST.ADAPTER_MISSING

4. Cross-reference: codes that are also feature strings

Three identifiers are not errors and MUST NOT be emitted in an error object; they are advertised in hello.features and endpoint descriptor features[]:

FeatureMeaningWhere
MHS.SAFETY.NOT_CERTIFIEDMandatory disclosure that OpenMHS is not a safety certification.MHS-004 SAFE-050.
MHS.CAPABILITY.EXPERIMENTAL_PRESENTAn experimental capability class is bound by this endpoint.MHS-003 CAP-005.
replay.seekReplay endpoint supports revision seeking.MHS-005 FID-024.

ERR-008. An endpoint MUST NOT use an error code as a feature marker or a feature string as an error mhs_code; the two vocabularies are disjoint except for the three documented disclosures above, which are only features.


5. Client handling of unknown codes

ERR-009. A client that receives an unregistered MHS.<AREA>.<CODE> MUST treat it as a non-retryable error of that area, display the code and message, and MUST NOT map it to success or to a generic "unknown" that loses the area. Area-level behaviour is stable; code-level additions are MINOR changes.

ERR-010. A client MUST NOT retry when data.retryable is absent. Absence is treated as false; the endpoint is non-conformant for omitting it.


6. Adding a code

ERR-011. A new code requires an accepted RFC (MHS-010 §2), a record in errors.json (this appendix is regenerated from it), a conformance test for the condition, and a MINOR version bump of the document set and suite. Deletion/retirement follows the deprecation windows of MHS-010 §5.

ERR-012. The code string and its meaning are part of the stable API surface: renaming a code is prohibited; introduce a new code and retire the old one.


7. Requirements list (this appendix)

ERR-001 Codes match the grammar and are registered here. ERR-002 Stable meaning; no reuse. ERR-003 mhs_code, message, data.retryable mandatory; remediation advised. ERR-004 Branch on mhs_code, not message or numeric code. ERR-005 Receipt errors use the same objects/codes. ERR-006 Retryable only when safe; unknown/safety never retryable. ERR-007 Structural code per area. ERR-008 Feature strings and error codes are disjoint vocabularies. ERR-009 Unknown codes handled by area, non-retryable. ERR-010 Missing retryable means not retryable. ERR-011 New codes via RFC + test + MINOR bump. ERR-012 No renaming; new code + retirement instead.