How does a negative feedback amplifier reach steady state?
This obvious answer is that your code has a bug.  I haven't looked at in detail to find it, but real opamps are a clear existance proof that feedback does really work.

That said, stability is a issue even with real opamps.  This is probably easier to see by imagining the opamp working in discrete steps, much like a computer simulation.  If the output is low and our step size too large, then the output will slam high that iteration.  Now the output is too high, and will slam low next iteration, etc.

Something similar happens in the continuous analog domain too.  It turns out that stability is less at lower overall loop gains.  This is why you sometimes see opamp datasheets say the amp is "unity gain stable".  That means it won't oscillate down to a gain of one.  Among other things, such opamp can be safely used as a voltage follower.

Internally compensating a opamp to be stable at unity gain lowers its gain*bandwidth product.  Some opamps are therefore compenstated for stability only at a higher gain, which is useful in circuits that require more bandwidth and want the higher gain anyway.