AgentSession Not Found

agentsession-not-found · 404

The API found no agent session by that id in the workspace the call ran in.

A session's id is the X-Ghaym-Session value the agent chose, and resourceId repeats it. A session in another workspace answers this same 404.

Besides the members every error carries, this type adds resourceType and resourceId.

Common causes

  • No write and no held call has carried that id in X-Ghaym-Session: a read opens no session.
  • The session is in another workspace than the one the call ran in: a call runs in the workspace its X-Ghaym-Workspace header names, or a stream's ?workspace=<id> when the header is absent.
  • The id has a typo in it.

How to fix the call

  • Read resourceId and compare it with the value you meant to send.
  • List the sessions with ghaym cloud sessions list and take the id from that answer.
  • Send X-Ghaym-Workspace with the workspace the agent worked in.
  • Don't retry unchanged: the same call answers the same 404 for as long as nothing changes.

Example response

json
{
  "type": "agentsession-not-found",
  "title": "AgentSession Not Found",
  "detail": "AgentSession with ID '0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401' was not found",
  "resourceType": "AgentSession",
  "resourceId": "0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401",
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/agent-sessions/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401",
  "method": "GET",
  "instance": "GET /v1/agent-sessions/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401",
  "status": 404,
  "docs": "https://ghaym.me/docs/errors/agentsession-not-found"
}