@Shehroze -Support @Retell - I shared your response with my dev and got this reply from. Please forward to your team and see if this makes sense and we can somehow fix this.
———
the “Session not found” error, it is coming from the Retell platform rather than our application. The response {"error":{"code":-32001,"message":"Session not found"},"jsonrpc":"2.0"} is a JSON-RPC message returned by Retell when the call session on their side is no longer available. This can happen if the Retell session expires or times out, if the call ends before the tool execution completes, or if there is a temporary network issue between our server and Retell. In such situations Retell tries to post the tool response back to the call, but the session has already been cleaned up on their end, resulting in the 404/session not found message. From our side, we have increased the ActiveSessionCacheDuration from 30 to 60 minutes and added a sliding expiration of 30 minutes so each access refreshes the TTL for active sessions. That said, if Retell internally closes or expires the session, we cannot restore it from our system, as this depends on Retell’s platform limits and lifecycle policies. Please let us know if the timeout can be extended or if there is a recommended approach for long-running tool executions.