I'm sorry, but the knowledge sources do not contain information about a built-in configuration option in Ory Kratos for setting a retry limit or throttling failed OTP/code validation attempts. There are open discussions and feature requests about implementing throttling and account lockout after repeated failed login attempts, but these features are not currently available out-of-the-box. The Ory team recommends handling such logic externally, for example, using a Web Application Firewall (WAF) or custom webhook logic. There is mention of a possible webhook for failed login attempts, which could be used to implement custom retry or lockout logic, but this is not a native configuration in Kratos itself at this time [Throttling repeated login requests & account lock](
https://github.com/ory/kratos/issues/3037). If you need this functionality, you may need to implement it outside of Kratos or monitor ongoing development for future support.