Steps:
Create a flat world in Creative Peaceful difficulty.
Dig a 5x5 pool 1 block deep and fill it with water. Put some tropical fish in the pool (not necessary but fun to watch in the next step).
Put three axolotls in the pool.
Fly up until the axolotls don't notice you.
Wait.
Expected: Axolotls that leave the water return in time to save themselves from dying. Or, they don't venture away from water farther than some reasonable distance.
Actual: The axolotls leave the water and wander off. Sometimes they return, but eventually all the axolotls die from prolonged exposure out of water.
If an axolotl returns to the water, it eventually leaves again, stays out too long, and dies. I observed one meander back to the pool, but when it was two blocks away, it veered off and ambled away, and then flashed red and died - it could have made it back to the water easily.
This suggests either that axolotls aren't actually pathfinding to water, or their AI has no awareness of how long they've been out of the water and no urge to return.
Possibly related toΒ MC-228464.
Update based on comment below: This apparently happens only when the water is 1 block deep. Axolotls don't venture too far from water that is deeper.
Related issues
Comments


Still happening in 1.18.2.
Resolving temporarily as Awaiting Response. Does this issue also occur when the water pools are 2 blocks deep? This ticket will reopen automatically when you reply.

I never thought the depth would make a difference. I just tested it. Even one single 2-block-deep column of water in my 1-block-deep pool is enough to prevent the axolotls from wandering off and dying. They seem to venture no farther than 16 blocks from the 2-block-deep water column.
The bug description still stands, though. Axolotls don't seem to recognize shallow water as something to return to.
I suspect if the 1-block-deep pool is extended more than 16 blocks from the 2-block-deep column, it is possible that axolotls who venture out of the pool would lose their way again. I have noticed by randomly placing axolotl spawn eggs that spawning an axolotl beyond 16 blocks of 2-block-deep water, they move off in a random direction and may never find their way to the water.

Confirmed that a 33x33 pool 1 block deep with a 2-block-deep hole in the middle (so the edges of the pool are 16 blocks from the hole) causes axolotls to get lost if they leave the water's edge. It seems axolotls require water at least 2 blocks deep within 16 blocks for pathfinding, and they ignore water 1 block deep. For a single 1x1 pool that is 2 blocks deep, axolotls can pathfind to it up to 16 blocks away, but on their own, they don't wander further than 8 or 9 blocks from that water.

Noticing this same behavior in my new 1.19 world. After reading the comments I will try digging some two block deep holes as a workaround as this lush cave has only one block deep water.
Edit: The 2-block deep holes worked. The ones that were out of the water started pathfinding back when the holes were dug. However, now they mostly just sit in the 2-block holes and don't really do anything. They even ignore fish swimming by.Β

We are going to track this issue with axolotls as part of the more general report on mobs moving to water at MCPE-122278. Resolving as a duplicate.
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?
This ticket will automatically reopen when you reply.
Quick Links:
π Issue Guidelines β π¬ Mojang Support β π§ Suggestions β π Minecraft Wiki