104003: Run lifecycle event publish failed

run_lifecycle_event_publish_failed

The publish of a run's start, suspend, or end, or of one of its steps' start or end, was rejected, or the channel was unavailable. Clients therefore do not observe the run or step entering that phase.

What you should do

Inspect the cause: it carries the underlying publish failure and its own Ably error code, so follow that for what went wrong and how to fix it. Nothing retries the publish for you, so the run or step is left mid-transition: under a durable-execution framework re-running the activity publishes the event again, and without one the agent has to decide whether to abandon the run or re-attempt it.

Why it happens

Runs publish lifecycle events as they progress, at two tiers: a run's own start, suspend, and end, and the start and end of each step within it. This error is raised when any of those publishes fails, including the terminal publish that ends a still-open run when the session is closing. The originating publish error is preserved as the cause.

What you'll see

The error is reported with code 104003 and status 500. The message names the run and the phase, in the form unable to publish run-start for run ...; ..., unable to publish step-end for run ...; ..., or unable to end run ... on session end; .... It rejects the call that published the event, with two exceptions: the terminal publish that ends a still-open run when the session closes is delivered to the session's error handler, and a step opened implicitly by a run's response pipe surfaces this as the cause of a run response stream error, error code 104008.