Minecraft Java Edition 26.3
Reliable clientbound/minecraft:post_effects reproduction

Install:
1. Put this ZIP directly in <world>/datapacks/
2. Run /reload
3. Run /function postfx_repro:start

Expected:
Post effects update without disconnecting the player.

Observed on the reporter's system:
The player is disconnected while clientbound/minecraft:post_effects is encoded,
with java.util.ConcurrentModificationException from ArrayList$Itr.next /
ByteBufCodecs.encode.

Notes:
- Vanilla singleplayer
- No resource pack
- No advancements
- 4096 fixed post-effect identifiers are used because this reproduces the issue
  consistently on the reporter's system.
- After setup, the test changes only one identifier once per game tick:
    posteffect remove @s postfx_repro:toggle
    posteffect add @s postfx_repro:toggle

Stop, if still connected:
  /function postfx_repro:stop
