# 104005: Write failed Identifier: `write_failed` Ably rejected a message sent by an AI Transport agent adaptor. In the Vercel chat transport, this error means the HTTP POST to the agent endpoint failed or returned a non-2xx response. ## What you should do Check which operation failed: - **Ably rejected a message published by an agent adaptor's `send`.** The `cause` contains the error Ably returned for the publish, including its error code. Use that error to find the problem. - **The Vercel chat transport's HTTP POST failed.** The request to your agent endpoint either returned a non-2xx response or failed outright. For a non-2xx response, the error reports the status returned by the endpoint. Check that the endpoint is reachable and returns a 2xx. Neither operation is retried automatically. Fix the problem, then send the message again. ## Why it happens An adaptor's `send` publishes one message to the channel. In the Vercel chat transport, a send POSTs to your agent endpoint. The endpoint publishes on the agent's behalf. This error is reported when either operation fails for a reason other than permissions. Permission failures are reported separately as capability errors. The original failure is preserved as the `cause` where available. ## What you'll see The error is reported with code 104005. Its status is 500 for a refused publish. For a non-2xx POST, it is the status the agent endpoint returned. Messages take the form `unable to publish; ...` or `unable to send messages; ...`.