Eventually, the ground will become depleted of phosphorous and potassium. Other trace elements tend to take a really long time to deplete, especially in clay.
For every product that leaves the farm, it takes something from the ground. Some can be amended with legume plants, but minerals will deplete at some point - adding them yearly is responsible farming.
That said it still could run into problems with other requisite elemental depletion in soil even with assistance of things like bacteria. If the plants need calcium and it is all extracted then thr farm would be limited to simpler life that doesn't need any trace elements. If say algae can get by on just atmospheric gas components, water, and sunlight indefinitely then a hypothetical algae farm could run indefinitely. But there isn't much of a market for algae.