A clear message when a session hits its time limit

October 28, 2026 · release

@voicethere/agent 0.19.0 · @voicethere/client 0.15.0 · @voicethere/cli 0.18.2

A project can already end every session after a fixed number of minutes with max_session_minutes. What the caller saw at that moment was a dropped connection and a reconnect attempt, with nothing to say why. That is fixed.

What changed

The new project setting max_session_close_reason holds the text the caller sees when the limit ends the session, up to 200 characters. Leave it empty and they get "Session reached the N minute limit". You can edit both settings under Project Settings → Runner settings → Max session length, or with voicethere projects session-settings set. They apply on the next deploy.

In @voicethere/client 0.15.0, the browser and Node clients report a terminal SESSION_MAX_LENGTH session error whose message is that text, and they do not try to reconnect.

In @voicethere/agent 0.19.0, your agent runs onSessionTimeLimit before the close and has up to 10 seconds to say goodbye. It can also look at the limit for one session with getSessionTimeLimit, and turn it off or on with disableSessionTimeLimit and enableSessionTimeLimit. Elapsed time counts from when the first client joins and does not reset on reconnect, so enabling a limit that has already passed closes the session right away.

Try it

voicethere projects session-settings set max_session_minutes 10
voicethere projects session-settings set max_session_close_reason "Demo time is up. Sign up to keep building."
voicethere deploy --wait
onSessionError: (event) => {
  if (event.code === "SESSION_MAX_LENGTH") showBanner(event.message);
},

Similar posts

← All posts