You seem to be conflating evolution with learning. Seagulls didn't evolve to steal from trashcans, they learned to.
As for the main point of your question: the clams are replaced every so often, so they won't end up getting used to the city water and stop serving as a marker.
Valid question though, and the answer to what I think you wanted to know is >3 months:
> the clams are “paid back after three months of work by releasing them to a place from which they will never be caught again”. [---] this is done because they eventually become resistant to contamination in the water.
As for the main point of your question: the clams are replaced every so often, so they won't end up getting used to the city water and stop serving as a marker.