Updated:

Command context limit game rule (max_command_forks)

The "Command context limit" rule is called max_command_forks in Java 1.21.11 and later, and maxCommandForkCount in 1.21.10 and earlier. Sets the most execution contexts one command, such as execute as, can create.

Basic data

NameCommand context limit
Rule name (Java 1.21.11+)max_command_forks
Old name (Java 1.21.10 and earlier)maxCommandForkCount
Bedrock nameNo rule with the same name
Value typeInteger
Default65536

Commands you can copy

Set to 10000

/gamerule max_command_forks 10000

Reset to the default (65536)

/gamerule max_command_forks 65536

Check the current value

/gamerule max_command_forks

Java 1.21.10 and earlier

/gamerule maxCommandForkCount 10000

Notes

Questions

Typing maxCommandForkCount gives an error

In Java 1.21.11 and later the rule is called max_command_forks. Write /gamerule max_command_forks … instead. Worlds on 1.21.10 and earlier keep the old name.

How do I check the current value?

Run /gamerule max_command_forks without a value. The current value is shown in chat.

Other game rules