Error Codes

Reference for errors returned by agentd, the libagent client, and tool invocations.

IPC-level errors

These are returned as Response::Error { message } over the Unix socket when the daemon cannot process a request.

Error message patternCause
agent not found: <id>The specified agent ID does not exist or has already terminated
permission deniedThe requesting agent lacks the required capability
invalid requestThe request payload is malformed or missing required fields
secret not found: <name>A {{secret:<name>}} handle references an unregistered secret
no matching policyA secret resolution attempt has no active pre-approval policy
policy expiredThe matching pre-approval policy has passed its expires_at timestamp
policy exhaustedThe matching pre-approval policy has used all its max_uses allowances
mcp server not found: <name>ash mcp attach referenced an unregistered MCP server name
agent store: not found: <name>ash agent run referenced an uninstalled agent name
hierarchy depth exceededAgent tried to spawn a child beyond the maximum hierarchy depth
capability escalation deniedSpawnChildAgent cap_override contains capabilities not held by the caller
invalid manifest: <detail>Manifest YAML failed validation
unsupported api version: <v>Manifest apiVersion is not scarab/v1
lifecycle timeout_secs=0 is invalidManifest declares a zero timeout

Tool result statuses

Every tool invocation returns a ToolResult with a status field.

StatusDescription
successTool executed and returned a result
deniedThe agent's capability set does not include tool.invoke:<tool>
not_foundThe requested tool name is not registered in the agent's ToolRegistry
errorTool executed but encountered a runtime error (see output for details)

Common error status messages

ToolErrorCause
fs.readfile not foundThe specified path does not exist
fs.readpermission deniedPath is outside the agent's fs.read:<scope> capability
fs.writepath not writablePath is outside the agent's fs.write:<scope> capability
fs.deletepath not deletablePath is outside the agent's fs.delete:<scope> capability
web.fetchnetwork policy violationTarget host not allowed by the agent's network.policy
web.fetchconnection refusedRemote host rejected the connection
web.searchscrape errorDuckDuckGo Lite returned an unexpected HTML structure
lm.completemodel not availableSCARAB_MODEL references an unavailable model
sandbox.execexec failedThe sandboxed command could not be spawned
sandbox.exectimeoutSandboxed execution exceeded the time limit
sensitive-ophuman deniedOperator denied the HITL approval request
sensitive-opapproval timeoutNo operator response within approval_timeout_secs

Client-side errors (ClientError)

Errors returned by the libagent AgentdClient before a response is received from the daemon.

VariantDescription
ConnectionFailed(io::Error)Could not connect to the agentd Unix socket. Check that agentd is running and SCARAB_SOCKET is correct.
EncodeError(serde_json::Error)Failed to serialize the request to JSON, or failed to deserialize the response. Indicates a version mismatch or corrupt frame.
UnexpectedEofThe socket stream closed before the full response frame was received. agentd may have crashed or restarted.

Manifest validation errors

Returned by ash validate and by AgentManifest::from_yaml().

ErrorCause
unsupported API version: <v>apiVersion is not scarab/v1
expected kind 'AgentManifest', got '<k>'kind field is wrong
agent name cannot be emptymetadata.name is blank
invalid capability in manifest: <cap>A capability string cannot be parsed
capability 'net.fetch:*' requires trust_level >= trustedOver-privileged capability for the declared trust level
lifecycle timeout_secs=0 is invalidTimeout must be > 0
scheduler cost_budget must be > 0Cost budget must be a positive number

Anomaly events (not errors, but important signals)

These are not errors in the IPC sense but are recorded as anomaly events:

EventTrigger
HighToolInvocationRateTool calls per minute exceeded threshold
RepeatedToolFailureSame tool failed N consecutive times
CapabilityEscalationAttemptAgent used a denied capability
ResourceExhaustionMemory or CPU limit approached
CostBudgetExceededScheduler cost budget exhausted

See ash anomaly list to view events.