Agent Errors

Problem type harness-error

This URI identifies a Problem Details (RFC 9457) object that describes an error detected by an AI agent harness:

https://agenterrors.org/problems/harness-error

Implementations may use this URI until the problem type is registered with IANA as https://iana.org/assignments/http-problem-types#agent-harness-error. Consumers must treat the two URIs as equivalent.

This page summarizes the editor's copy of the draft. If they differ, the draft is authoritative.

Required member

code is a registered error code of the form <category>.<name>, for example output.schema_violation. Consumers decide what kind of error occurred from code, never from title or detail.

Extension members

MemberMeaning
originWhere the error originated: model, harness, tool, upstream, or user.
retryableWhether repeating the same operation unchanged may succeed.
model_recoverableWhether the model is likely to correct the error if it is told about it.
model_feedbackText intended for the model, distinct from detail, which is for humans.
retry_afterSeconds after which a retry is advised.
attempts, max_attemptsAttempts already made, and the configured maximum.
limitThe exceeded limit: name, value, observed, unit.
locationWhere in the run: run_id, turn, tool_name, tool_call_id, pointer.
upstreamRaw information from an upstream component, kept for diagnosis.
causesProblem details objects that caused this one, most recent first.

Code categories

CategoryDescription
outputModel output could not be accepted by the harness.
loopA limit on the agent loop was reached, or the loop is not progressing.
contextContext assembly or management failed.
toolTool resolution or execution failed.
policyA policy, guardrail, refusal, or human decision stopped the operation.
upstreamA remote dependency, typically the model API, failed.
harnessThe harness failed for another reason.

The full list of codes, with default values for retryable and model_recoverable, is in the draft.

Example

HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json

{
  "type": "https://agenterrors.org/problems/harness-error",
  "title": "Output Retries Exhausted",
  "code": "output.retries_exhausted",
  "origin": "harness",
  "retryable": false,
  "attempts": 3,
  "max_attempts": 3,
  "causes": [
    {
      "type": "https://agenterrors.org/problems/harness-error",
      "title": "Output Schema Violation",
      "code": "output.schema_violation",
      "origin": "model",
      "model_feedback": "Field 'price' must be a number, got string.",
      "location": { "turn": 5, "pointer": "/items/0/price" }
    }
  ]
}

Other bindings