104009: Message decode failed

message_decode_failed

An AI Transport codec threw while decoding a message that arrived on the channel. The message is still delivered without a decoded event, and decoding continues with later messages.

What you should do

Inspect the cause to find out what threw. If the error came from a custom codec, fix the codec so it decodes the message or returns nothing for a message it does not handle. It should not throw for an unhandled message.

You do not need to reconnect. Only that message failed to decode. Your application still receives the raw message and can decide what to show in its place.

In the Vercel chat transport, a message that cannot be decoded ends the reply with this error if it arrives live during the reply. If the message is read from history, it is skipped and the reply continues without it.

Why it happens

The codec decodes each message that has its name and id. This error is raised when the codec throws. The thrown value is preserved as the cause.

Usually, the agent and client are using different versions of a codec, or a custom codec has received a payload shape it does not handle.

What you'll see

The error is reported with code 104009 and status 500. It goes to the decoder's error handler, rather than coming from a call you made. The message takes the form unable to process channel message; ....