Skip to content

idempotency_conflict

The Idempotency-Key was already used in the last 24 h, by the same principal, with a different request: another method, route, path or body.

HTTP 422 · invalid_request_error · not retryable

The Idempotency-Key was already used in the last 24 h, by the same principal, with a different request: another method, route, path or body. Bodies are compared byte for byte, so the same JSON with different spacing or member order counts as different. param is Idempotency-Key.

On POST /v1/actions the Gate compares keys itself. A key names one action of one agent for 24 hours, and the comparison is the request digest (the tool, the arguments in their RFC 8785 form, the mode and the tool digest) plus the Deedglass-On-Behalf-Of and Deedglass-Session headers. Spacing and member order don’t matter there; another tool, other arguments, another on-behalf-of or another session do. A signed intent isn’t compared, so a retry signed again still replays. The message: “This Idempotency-Key was used with a different request in the last 24 hours. Use a new key for a new request.”

Use a new key for a new request. To retry the original request, send exactly the same bytes (on POST /v1/actions, the same tool, arguments and headers).

HTTP 422 · idempotency_conflict
{
"error": {
"type": "invalid_request_error",
"code": "idempotency_conflict",
"message": "This Idempotency-Key was already used with a different request. Use a new key for a new request.",
"param": "Idempotency-Key",
"request_id": "req_01j9zr3m5k8q2w7x4t6v0b1c9d",
"doc_url": "https://docs.deedglass.com/errors/idempotency_conflict"
}
}

The message is for a person and can get more exact over time: branch on type and code, never on the message.

SDK Raised as
TypeScript (@deedglass/sdk) InvalidRequestError with code === "idempotency_conflict"
Python (deedglass) deedglass.InvalidRequestError with .code == "idempotency_conflict"