max_command_sequence_length
integerJava 26.2 onlySets the maximum number of commands that can execute in a single function chain before it terminates. Prevents infinite loops inside function files from hanging the server.
Common values
1024StrictCuts off function chains at 1,024 commands.
Java
/gamerule max_command_sequence_length 102465536DefaultThe Minecraft default.
Java
/gamerule max_command_sequence_length 655361000000PermissiveVery high limit for large function libraries.
Java
/gamerule max_command_sequence_length 1000000Default: 65536. Restore with /gamerule max_command_sequence_length 65536
What max_command_sequence_length does
Sets the maximum number of commands that can execute in a single function chain before it terminates. Prevents infinite loops inside function files from hanging the server.
max_command_sequence_length is a Java Edition-only gamerule and is not available in Bedrock.