Agent Cannot Approve

agent-cannot-approve · 403

An agent tried to approve or deny a held call, and only a person may decide one, so the approval is still pending.

A call counts as an agent's when it carries an X-Ghaym-Agent, X-Ghaym-Session or X-Ghaym-Intent header, whatever its token. The agent holds the person's own token, so the headers are what tell the two apart. approvalId names the approval.

Besides the members every error carries, this type adds approvalId.

Common causes

  • An agent sent POST /v1/approvals/<id>/approve or /deny with its identity headers.

How to fix the call

  • Ask the user to decide: they approve or deny it in the console, or run ghaym cloud approvals approve <id> themselves.
  • Wait for the decision with ghaym cloud approvals wait <id>.
  • Don't drop the headers to get past this: the decision would then be recorded as the person's.

Example response

json
{
  "type": "agent-cannot-approve",
  "title": "Agent Cannot Approve",
  "detail": "Approval 0199e0a3-6f21-7c4a-9d18-2b7c5f3ad402 can only be decided by a person. Send this request without the agent identity headers, from a human session.",
  "approvalId": "0199e0a3-6f21-7c4a-9d18-2b7c5f3ad402",
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/approvals/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad402/approve",
  "method": "POST",
  "instance": "POST /v1/approvals/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad402/approve",
  "status": 403,
  "docs": "https://ghaym.me/docs/errors/agent-cannot-approve"
}