The Longest Possible Chess Game
chess.com
chess.com
There are actually new FIDE rules as of 2014 or so, where after 75 moves, or a fivefold repetition, the game is immediately declared drawn without the need for a player to take action.
Thanks for that clarification.
In perfect play either black or white resigns in their first move or agrees to a draw.
But in in-perfect play you could get a situation where it plays until heat death. You at the very least could wait for a bit flip on the memory of the opposing player that might let you win.
Of course two Kings can't checkmate each other. If the board bit flipped, well that would be cheating / not a proper game. So in this specific case it'd be agreeed to a draw without the 50 move/repetition rule by the most basic of programs since checkmate is not possible given any play. But legally they wouldn't have to, unlike the above scenario when it can make logical sense to continue.
However, http://www.fide.com/component/content/article/1-fide-news/10... doesn't mention that, and even has the in some sense stronger "a game is drawn if any series of at least 75 moves have been made by each player without the movement of any pawn and without any capture.", which doesn't require either player to claim the draw, and, thus, cannot be avoided.
So, even if the players wanted it, a game can't be longer than somewhere around 96*75 or 7200 moves.
Note that by winning sequence I mean perfect play on both sides - there are lots of sequences to allow to allow the game to continue longer than it has to.
https://en.wikipedia.org/wiki/Endgame_tablebase#Tables
It seems like different parts of the chess world are a little bit divided about the best way to integrate this knowledge into the game.
On tablebase-informed endgame theory, some of the professionals in these ultra-long games should probably have resigned long before the actual end of the games, except that they can also assume that their opponents don't know the full solutions.
That even happened back in the time when games got adjourned after x moves (sort of an example: https://www.chess.com/blog/NimzoRoy/a-famous-bishop-vs-knigh...), so should be more popular nowadays, if the losing party has more time on the clock, or thinks to know the particular endgame better.
The 50 move rule is there to ensure that the players don't have to occupy every possible position twice before making progress, but it is not the only possible way to put an upper bound on the game's length. Since the position will eventually repeat, and the three repititions rule can be invoked.