Skip to main content
HTTP status: 404

Error message

When this error occurs

POST /agents/conversations/{id}/waitables/{handle}/cancel was called with a handle the conversation cannot use. Three different situations produce this one answer:
  • the handle was never registered, or was mistyped
  • it belongs to a different conversation — handles are scoped to the conversation that was issued them, and cannot be used next door even while they are perfectly valid in their own
  • it has expired. Handles last 24 hours, after which the row can be swept
The response does not say which, deliberately. Telling them apart would let a caller probe whether a given handle exists, and it is the same posture the wait_for tool takes when it meets a handle it cannot resolve. You will also get a 404 — as Conversation Not Found — when the conversation itself is not yours, since conversations are per-user.

How to fix

  1. Read the handle back from where it was issued: the job_monitor tool result in GET /agents/conversations/{id}/messages, under waitable.handle. Pass it through unchanged — handles are opaque, and nothing about them is meant to be constructed or edited.
  2. Check you are cancelling on the conversation that owns it. A handle from one conversation is not usable in another.
  3. If more than 24 hours have passed, the handle is gone. There is nothing to cancel: any wait on it ended long ago, and if the work still matters, register the job again with job_monitor to get a fresh handle.

What this error does not mean

It says nothing about the task behind the handle. A job whose handle has expired, or whose handle you mistyped, is still running — cancelling a claim never affected the work in the first place. Follow it the ordinary way instead, as Tracking jobs describes.