When does a blockchain fork resolution happen? I understand that forks are resolved by largest proof-of-work etc. but when do the miners decide to resolve a fork? Is it a question of network consensus or does each individual miner resolve at their own pace?
Each node will usually resolve and reorganize their local chain as soon as they are made aware of a chain with more work.
If two blocks are mined at block height N, there is a fork. As soon as a single block at height N+1 is mined and broadcasted, any nodes that receive it will keep the block N that the new block builds upon, and orphan the other block as there is now one chain with more work.
This is what makes block withholding attacks possible, as an attack could broadcast several blocks at once, which suddenly present a new, longer, valid chain.