You Inherited a Codebase From a Failed Vendor: Keep, Refactor or Rewrite?

A failed vendor leaves you with code you did not choose and a deadline you cannot move. Here is what to secure in the first 72 hours, a seven-point audit with red, amber and green ratings, and a decision matrix for keeping, refactoring in place or rewriting.

OutsourcingYou Inherited a Codebase From a Failed Vendor: Keep, Refactor or Rewrite?

What Should You Do in the First 72 Hours?

Secure access before you form an opinion about the code. A new team can only work with what you can open, so the first three days are about control, not quality. Get the repositories transferred into an account you own, then list every system the product touches: hosting and cloud accounts, the domain and DNS, the database, CI, monitoring, payment and email providers, and any third-party API keys.

Then rotate what the old team could see. Change passwords and keys, remove the former vendor's people from every account, and confirm that backups exist and can be restored. If you do not control a system, treat the code in it as not yet yours. This is also why we ask that engineers work in your repository and your tools from day one: nothing has to be extracted from a vendor later.

For the legal and handover side of leaving a vendor, see our guide to a vendor transition plan and the software project takeover page.

What Does a Seven-Point Audit Check?

Rate each area red, amber or green after a short, hands-on look rather than a long report. The point is not a score; it is a list of what blocks you from changing the product safely. A senior engineer who did not write the code can run most of this in days.

Seven-point audit of an inherited codebase
CheckGreenRed
The tests runA clean checkout runs the tests and most passNo tests, or they cannot be run
The build is reproducibleOne documented command builds the same artefact on a new machineIt builds only on the old developer's laptop
Dependencies are supportedLanguages and databases are still receiving security fixesCore runtimes are past end of support
No secrets in the historyKeys live in a secrets store, not in commitsPasswords or keys appear in repository history
The data model is understoodA schema you can explain and a migration historyUnexplained tables, manual changes in production
Deployment is repeatableA pipeline deploys, and rollback is knownDeploys are manual steps someone remembers
Documentation existsA README, setup steps and the main decisions written downNothing beyond the code itself

How Old Are the Dependencies, Really?

Check the runtime and database versions first, because end-of-support dates are fixed and public. A codebase on a version that no longer gets security fixes is not just old; it carries a deadline. We cover three that matter right now: the Python 3.10 end of life, the PostgreSQL 14 end of life and the .NET 8 and 9 end of support. An upgrade is a refactor, not a rewrite, so it belongs on the keep-or-refactor side of the matrix.

Adding engineers to a roadmap like this? Spec your team in a minute.

Keep, Refactor in Place or Rewrite: Which One Does the Audit Support?

Choose the cheapest option the audit supports, and write down the trigger that would make you change your mind. Mostly green means keep the code and add what is missing. A mix of green and amber means refactor in place, one area at a time, while the product keeps running. Rewrite is for the case where the audit finds red in the areas you cannot fix piece by piece, such as a data model nobody can explain or an architecture that cannot take the next feature.

Decision matrix for an inherited codebase
OptionChoose it whenTrigger to reconsider
KeepMostly green: it runs, it is tested, you can deploy itTwo or more areas turn amber within the first month
Refactor in placeGreen core with amber or red edges you can replace one at a timeA fix in one area keeps breaking another
RewriteRed in the data model, architecture or security, and the product cannot move without themThe audit finds the red areas are smaller than first thought

Why Do Full Rewrites Usually Fail?

Because old code contains years of fixes that nobody wrote down. Joel Spolsky made the case in 2000 in Things You Should Never Do, Part I, calling the decision to rewrite from scratch the single worst strategic mistake that any software company can make. His reasoning is the useful part: the old code looks messy, he wrote, because those are bug fixes. A rewrite throws that knowledge away and rediscovers it the expensive way, while the old product stands still.

The essay is a 2000 opinion about one company, not a study, and it does not say a rewrite is never right. It does explain why the bar is high. If you choose to rewrite, do it in slices that replace one part at a time behind the running product, and keep the old system working until each slice has proved itself.

Can a Small First Workstream Work as the First Step?

Yes, as a way to test the audit on real work, not as a separate audit product. A developer who is not the right fit is replaced free within the first 30 days. Give the new engineers one small, real change in the inherited code: fix a defect, add a test, ship a deploy. How easy or hard that is tells you more than a report.

Write the pass or fail criteria before day one. Engineers can typically start within one to two weeks of first contact; a full team usually takes two to four weeks, and the engineering practices that apply on every engagement, such as peer review and tests on every pull request, are the ones to hold the new team to from the first change.

What Is Your First Move Today?

Secure access, rotate the keys, then run the seven checks before you choose a direction. If you want a second pair of eyes on what the audit shows, tell us the stack and what the previous vendor left on our contact page and book a 15-minute intro call; if there is a fit, a 60-minute discovery call follows.

Building a team in Eastern Europe?

StepTo builds dedicated nearshore engineering teams in Belgrade, Serbia. Engineers can typically start within one to two weeks of first contact; a full team usually takes two to four weeks. From $4,500 per developer per month.

Related: Software project takeover

I

Written by

Igor Gazivoda

Founder & CEO · StepTo

Igor has 15+ years in software engineering and business development. He specializes in scaling engineering teams, nearshore strategy, and AI-driven product development. He holds a Master's in Computer Science from the University of Belgrade.

LinkedIn →
Performance-led engineering

Want senior engineers who move work forward, not just tickets?

Work with accountable, English-fluent professionals who communicate clearly, protect quality, and deliver with a steady operating rhythm. Cost efficiency matters, but performance is why clients stay with us.

Delivery signals · senior engineering team
Senior ownership
Lead-level
Delivery rhythm
Weekly
Timezone overlap
CET
1 teamaccountable for outcomes, communication, and execution