https://retellai.com/?utm_source=discord&utm_medium=seo logo
my chat agent is not ending when the user just clo...
# ❓・ai-evy-support
h
@AI Evy my chat agent is not ending when the user just closes the tab or browser and its been over a day. Is this a known bug and when will it end automatically?
a
Thanks for tagging me @hpt09. I'll look through relevant sources and get back to you shortly.
### Answer Chat agents have a configurable
end_chat_after_silence_ms
setting that automatically ends the chat after a period of user silence. [(1) ]() By default, this is set to *3,600,000 ms (1 hour) *. The minimum value allowed is *120,000 ms (2 minutes) * and the maximum is *259,200,000 ms (72 hours) *. If your chat has been open for over a day without ending, you may want to check your current
end_chat_after_silence_ms
configuration. You can retrieve this via the Get Chat Agent API or update it using the Update Chat Agent API to set a shorter timeout if needed. [(2) ]() , [(1) ]() To update this setting, you can use:
Copy code
javascript
const chatAgentResponse = await client.chatAgent.update('your_agent_id', {
  end_chat_after_silence_ms: 3600000 // or your preferred timeout
}) ;
[(2) ]() If the chat still isn't ending as expected after the configured silence period, this may be something to report to support for further investigation.
​ To learn more, see the sources I considered: [[1] Get Chat Agent](https://docs.retellai.com/api-references/get-chat-agent) [[2] Update Chat Agent](https://docs.retellai.com/api-references/update-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
My end chat after silence setting is set to 30m. But its been over a day
@AI Evy My end chat after silence setting is set to 30m. But its been over a day
a
Thanks for the follow-up, @hpt09. I'll get back to you soon.
### Answer If your
end_chat_after_silence_ms
is set to 30 minutes and the chat has not ended after over a day, this behavior is not expected based on the documented functionality. [(1) ]() The
end_chat_after_silence_ms
setting should automatically end the chat if users stay silent for that period after agent speech. Since your configuration appears correct but the chat isn't ending as expected, this sounds like it could be a bug or an issue specific to your setup. I don't have information in the available sources that explains why this would happen. I'd recommend: - Verifying your setting by retrieving your chat agent config via the API to confirm the value is actually set to 1,800,000 ms (30 minutes) - Reaching out to support for further investigation Check out these potentially useful resources: - [Documentation]() - [Hire certified Retell partner]() Would you like me to try to answer this generally based on my knowledge, or do you have any other details about your setup that might help?
​ To learn more, see the sources I considered: [[1] Get Chat Agent](https://docs.retellai.com/api-references/get-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.