← Glossary Term
Legacy code
Older software a company still depends on, often hard to change because nobody remembers every rule inside it.
Legacy code is the older software that keeps a business running, even though it was written years or decades ago, often by people who have since left. It still works, so nobody wants to switch it off, but it can be slow to change and full of rules that were never written down.
Rewriting it is a popular job for AI coding agents, because the new version has to behave like the old one, which gives you something to test against. It is still risky: if the hidden rules are missed, things break in surprising places.
Mentioned in