In the comments here https://mathoverflow.net/questions/375602/analogue-to-szemer%C3%A9dis-theorem-for-non-monotone-sequences I find the following construction:
Consider all the at-most-k-bit binary numbers. Write them down in the usual order, then reverse all their bits; so e.g. if k=5 then in position 13 instead of 01101 we have 10110 or (in decimal) 22.
This sequence contains no length-3 arithmetic progression! Suppose it does, so we have $a < b < c$ with $r_k(a)+r_k(c) = 2r_k(b)$ where $r_k(\dots)$ is the bit-reversing function for length-at-most-$k$ binary numbers. And suppose we've done this for the smallest possible $k$. Then obviously our numbers don't all have the same "top bit" (else we could delete it and reduce $k$ by one). This means that $a,c$ have different "top bits", which means that their reversals have different 0th-bits, which means that the sum of their reversals is odd, contradiction.
Hence there is no longest such sequence: we can find AP-free sequences as long as we please.
(If we impose the requirement that the sequences be increasing, there's a well known paper by Erdős and Turan in 1936 that asks essentially this question -- more precisely, they ask: for given N, how long can the sequence be? -- and proves a few things; the main conjecture made there wasn't proved until 1975 and another stronger conjecture E&T made later eventually turned out to be false; so questions about this sort of thing can be very tough.)