Every error Realm raises on purpose has a code. This page lists all 87 codes that Realm defines: the 72 it raises, with when each is raised and what it tells the caller to do, and the 15 that nothing raises. The lists were made by a script that read the ErrorCode type and every place in Realm’s code that raises one. The replies shown came from calls to a running server.
The agent_action in a tool’s reply is the error’s agentAction, changed in three cases:
Case
The reply’s agent_action
The call failed before the run was read, for instance because the store failed
provide_input and resolve_precondition become report_to_user.
A step started and failed, and the run has ended
stop, whatever the error said.
A step started and failed, and the run is still open
stop, provide_input and resolve_precondition become report_to_user.
An answer that the step’s schema refuses is not one of these cases: the run is read and no step starts, so the reply keeps the error’s provide_input. An auto step that builds its input with input_map (one with a handler or a uses_service) is the exception: its schema checks what the map builds, not the caller’s input, so the reply says report_to_user. A handler that threw an error with agentAction: 'report_to_user' on a step that ended its run gave a reply with agent_action: "stop".
The last two columns are what the error carries where it is raised. Where a code is raised in several places with different values, all are listed, and retryable is Varies.
An answer does not fit the step’s input_schema, or the input an auto step with a handler or a uses_service builds with its input_map does not fit it, or the run’s parameters do not fit params_schema. Also a value a command or the filesystem adapter refuses.
provide_input, report_to_user
No
VALIDATION_OUTPUT_SCHEMA
A step’s output does not fit its output_schema.
provide_input
No
VALIDATION_TRACE_SCHEMA
A step’s trace does not fit its trace_schema.
provide_input
No
VALIDATION_EXHAUSTED
A step’s answers were refused as many times as its limit allows. The step fails.
stop
No
VALIDATION_WORKFLOW_SCHEMA
A workflow file is refused by the loader, or a realm.yaml is in the wrong folder.
report_to_user, stop
No
VALIDATION_EMPTY_VALUE
A required value is missing or empty: a file path, or a writer_nonce.
provide_input
No
VALIDATION_BATCH_TOO_LARGE
start_run_batch was given more items than its limit. Under realm agent: a step’s model asked to start more runs than max_fan_out.
provide_input
No
VALIDATION_BATCH_ITEMS
One or more items of start_run_batch do not fit params_schema. No run was created.
provide_input
No
VALIDATION_TRUST_VALUE
A step of a stored workflow has a trust value Realm does not know.
report_to_user
No
VALIDATION_ACTOR_INVALID
A name given as a program’s name or as an answerer cannot be used: --by, responded_by or a driver passed to the engine is empty or blank, or any of these or REALM_OPERATOR is longer than 200 characters or has a control character. An empty or blank REALM_OPERATOR counts as unset. Nothing was started or recorded. Added in 0.46.0.
report_to_user
No
VALIDATION_CALLER_INVALID
A program passed advanceRun, executeStep, executeChain, submitHumanResponse or executeEngineStep a caller that is not one of that function’s own words (see Core library). Nothing was read or written. Added after version 0.46.0.
An error Realm did not expect, or a call that breaks an internal rule.
stop
No
ENGINE_STORE_FAILED
The store failed while a step was being run, or a run’s record could not be read (execute_step, submit_human_response, advance_run, get_run_state, and the library calls).
stop
Varies
ENGINE_ARTIFACT_DELETE_FAILED
A store could not delete a run’s files. details.failures lists each one.
report_to_user
Varies
ENGINE_ADAPTER_FAILED
An adapter threw an ordinary error, or was asked for an operation it does not have.
report_to_user, stop
No
ENGINE_ADAPTER_NOT_REGISTERED
A step’s adapter is not registered. The step is blocked, and the run stays open.
stop
No
ENGINE_PROCESSOR_FAILED
A processor failed or is missing. No command reaches the code that raises it.
stop
No
ENGINE_HANDLER_FAILED
A handler threw an ordinary error.
report_to_user, stop
No
ENGINE_HANDLER_NOT_REGISTERED
A step’s handler is not registered. The step is blocked, and the run stays open.
stop
No
ENGINE_STEP_FAILED
Under realm agent: the model used every tool call it was allowed, and its final answer could not be read.
stop
No
ENGINE_RELEASE_LINE_MISMATCH
An object from another realm version: a store or registry a host handed realm, or a WorkflowError a handler, adapter or dispatcher threw. Names both versions and folders. Added in 0.46.0.
stop
No
ENGINE_RELEASE_LINE_UNDECLARED
A store a host handed realm declares no realm release line (declareReleaseLine). Added in 0.46.0.
stop
No
GATE_MESSAGE_UNRESOLVABLE
A gate’s message refers to a value that does not exist.
stop
No
FILTER_UNKNOWN
A gate’s message uses a template filter Realm does not have.
stop
No
ADAPTER_OP_UNSUPPORTED
An adapter does not have the operation, or the service_method, the step asked for.
report_to_user
No
ADAPTER_VALIDATION_FAILED
A parameter given to a built-in adapter is missing or has the wrong type.
provide_input, report_to_user
No
ADAPTER_REQUEST_FAILED
The Slack adapter’s request failed.
report_to_user
No
STEP_TIMEOUT
The step ran longer than its timeout_seconds.
report_to_user
No
STEP_ABORTED
An adapter’s request was cancelled because the step’s time limit passed.
report_to_user
No
STEP_RETRY_EXHAUSTED
The step failed on every attempt its retry block allows. details.lastError holds the last message.
report_to_user
No
INPUT_MAP_DEPTH_EXCEEDED
An input_map path is nested deeper than Realm follows.
report_to_user
No
INPUT_MAP_UNKNOWN_DIRECTIVE
An input_map of a stored workflow has a key that starts with $ and is not a directive.
report_to_user
No
BUFFER_FULL
A step’s trace buffer has reached its limit of entries or bytes.
provide_input
No
TRACE_CAPABILITY_INCONSISTENT
A trace buffer store says it can do something and lacks the functions for it.
stop
No
MCP_CONNECTION_FAILED
Under realm agent: a tool server named by an agent step could not be started or reached.
stop
No
MCP_TOOL_NOT_FOUND
Under realm agent: a step names a tool its tool servers do not have.
stop
No
MCP_TOOL_NAME_COLLISION
Under realm agent: two tool servers of one step give a tool the same name.
A file could not be read: a workflow file, or a file asked of the filesystem adapter.
provide_input, report_to_user
No
RESOURCE_FORMAT_INVALID
A workflow file is not valid YAML, or a registered workflow’s stored copy is not valid JSON.
report_to_user, stop
No
BUFFER_FULL, TRACE_CAPABILITY_INCONSISTENT and the three MCP_ codes are raised with the category ENGINE. STEP_NOT_FOUND is raised with STATE by one caller and ENGINE by another.