What is the safe, fixed limit for nested cloze deletions?

Hi.

I know there were issues with nested cloze deletions in the past. Has this been resolved, and if so, is there a known limit to how many levels of nesting are now supported?

The current implementation can only handle a limited amount of nesting. In Anki 24.11, it is 3 levels. In other versions, the limit is around 8, but Anki may become slow as you approach the limit. It is not possible to extend the limit. If you use this feature, it is recommended you limit yourself to a few levels of nesting.

  • According to the Anki Manual, the limit for nested cloze deletions is “around 8.” In my own testing, I was able to get up to 10 nested levels working, but anything beyond that broke.

I’m asking because I’ve been using deeply nested clozes in my workflow and really liked them. However, at one point the nesting limit dropped to just 3 levels, and it broke many of my cards. After that, I decided to play it safe and rewrote everything into standard front/back (Q/A) format.

Now I’m reconsidering. If the current limit is reliably 10 levels, that would be more than enough for my needs. But I’m hesitant to switch back to nested clozes if there’s a risk that the limit could change again in future updates — and break my cards all over again.

So my core question is:
What is the safe, fixed number of cloze nesting levels I can depend on long-term without worrying that future versions of Anki will reduce support and break my cards again?

Any clarification would be greatly appreciated.

1 Like

@llama found a way to implement it more efficiently, so the limit is unlikely to be reduced again. We’re still stuck with 10 as a max, due to the underlying libraries.

3 Likes

Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.