Taking over a codebase from a previous developer goes wrong in a predictable way: the new team starts changing code before anyone owns the accounts, before the app runs on a clean machine, and before anyone has read enough of it to know where the bodies are buried. The right order is the opposite. Secure ownership first, prove it runs second, assess third, and only then change anything. This post walks through that sequence, what to ask the outgoing developer, how to budget for the ramp-up, and the signs that a takeover is really a rebuild.

Get ownership of repositories and accounts before anything else

Access and ownership are different things. A developer can give you a login to a repository they own, and remove it the day a dispute begins. When taking over a codebase from a previous developer, the first job is to move ownership of every asset into an account your organisation controls.

Work through this list and tick each one only when the owner of record is you:

  • Source code hosting (GitHub, GitLab, Bitbucket): the organisation or repository owner is your account, with the previous developer downgraded to collaborator or removed.
  • Cloud and hosting (AWS, Azure, GCP, a VPS provider, Vercel, a shared host): billing and root ownership in your name, with a separate admin login for the new team.
  • Domain registrar and DNS: often overlooked, and the single most damaging thing to lose.
  • App store accounts: the Apple developer account and Google Play console should belong to the business, not the developer.
  • Third-party services: payment provider, email delivery, SMS, maps, analytics, error tracking, any AI API keys.
  • Secrets: database passwords, API keys, signing certificates, encryption keys. Rotate every one of them after the handover, because you cannot know who else has a copy.
  • Databases and backups: a full export of production data in a standard format, stored somewhere you control, before the previous developer's access ends.

If the previous developer is cooperative, this takes a day. If they are not, the contract decides what you can insist on. Many disputes at this stage come down to whether the agreement assigned the code to you; our earlier post on red flags at a software development company lists the contract terms that cause trouble later.

What to ask the previous developer while they are still answering

Handover documentation is rarely written. The practical substitute is a set of questions, asked while the outgoing developer still replies to email. Record the answers in a shared document the new team can read.

  1. How do you build and run this on a fresh machine? Which versions of which tools?
  2. How does a change get to production? Is there a pipeline, a script, or a sequence of manual steps?
  3. What breaks regularly, and what do you do when it does?
  4. Which parts of the code would you not touch, and why?
  5. Which third-party services does it depend on, and where are the credentials?
  6. Are there scheduled jobs, queues or background workers running somewhere outside the main app?
  7. Is there anything running on a server that is not in the repository?
  8. What were you in the middle of when work stopped, and what state is it in?
  9. Which libraries or frameworks are out of date, and is there a reason an upgrade was avoided?
  10. Where are the backups, and when were they last restored successfully?

Question 7 catches the thing that most often sinks a takeover: a cron job, a manual database patch or a hand-edited config file on a server that nobody can reproduce. Question 8 explains why a half-built feature is half built.

Does it run locally? The test that settles most arguments

Before an assessment, before an estimate, a senior engineer should clone the repository onto a clean machine and try to run the application with only what is in the repository plus the documented secrets. This is the single most informative thing you can do in the first week of taking over a codebase from a previous developer.

Three outcomes are possible:

  • It runs. Good. The codebase is self-contained enough to work with. Move to the assessment.
  • It runs after some archaeology. Missing environment variables, undocumented services, a build step that depends on a tool nobody mentioned. Each gap gets written down, because each one is a cost that every future developer would have paid again.
  • It does not run. The code on the server differs from the code in the repository, or depends on something only the previous developer had. You now know the takeover is partly a reconstruction, and that changes the budget before anyone has promised a date.

The outcome tells you whether you are inheriting a product or a set of parts. Do not let anyone estimate the "finish my app" work until this test is done.

Audit before touching anything

With ownership secured and the app running, the next step is an assessment, not a sprint. Changing code you do not understand is how takeovers turn into outages: a new developer fixes a bug in one place and discovers, in production, that three other features depended on the bug.

A proper code audit covers the state of the code, the test coverage, the security posture, the dependency versions, the infrastructure and the data model, and it ends with a prioritised list of what to fix first. Our earlier post explains what a code audit is and what it covers, and a companion post covers what affects the price of a code audit. For a takeover, the audit should answer four questions in particular:

  1. Is it safe to deploy? Can the new team release a change and roll it back without a hand-written procedure?
  2. Is it safe to change? Are there tests, and do they pass? Is the business logic in one place or spread across the code?
  3. Is it safe to run? Exposed secrets, unpatched dependencies, missing access checks, backups that were never restored.
  4. Is the half-built work worth finishing? A feature abandoned halfway may be closer to done than it looks, or may need redoing from the design.

Codebases that were generated with AI tools and never reviewed have their own failure patterns, which we described in why AI-generated code breaks in production. If the previous developer leaned on those tools, expect the audit to find them.

Budget for the ramp-up, not just the features

Owners taking over a codebase from a previous developer often arrive with a feature list and a date: "finish the payment screen by the end of the month". The feature list is real, but the first weeks are spent on things that do not appear in it.

Phase What happens What you are paying for
Ownership and access Accounts transferred, secrets rotated, backups exported Protection against losing the asset
Run locally Clean-machine build, gaps documented Knowing whether it is a product or parts
Audit Code, tests, security, infrastructure, data reviewed A prioritised plan with real estimates
Stabilise Deployment made repeatable, worst risks fixed, tests added around the core Being able to change things safely
Finish and extend The features you actually wanted The outcome

The stabilise phase is the one people try to skip, and the one that determines whether every later change takes a day or a week. Our post on why small software changes take so long explains the mechanics: a feature is small only if the system around it is healthy.

Two budgeting habits help. First, pay for the audit as a fixed piece of work with a written report, so you get a real plan before committing to the rest. Second, expect the first sprint after the audit to be mostly stabilisation, and treat visible features in that sprint as a bonus rather than the measure of progress.

Switching agencies without losing momentum

If you are switching software development agency rather than replacing a single freelancer, the same sequence applies with two additions. Overlap the agencies if the contract allows, even for a week, so the new team can ask questions while the old one is still paid to answer them. And insist on a written handover note from the outgoing agency covering deployment, environments, open work and known issues; a professional agency produces this without complaint, and reluctance tells you something.

Be realistic about the incoming team's incentives too. A new agency has every reason to call the old code terrible and propose a rebuild. Ask them to show their reasoning in the audit report, with specific files, specific risks and specific fixes, rather than a general verdict. Good engineers can usually find plenty worth keeping.

When a takeover becomes a rebuild

Most inherited codebases should be stabilised and improved, not replaced. A rebuild is justified when the audit finds one or more of the following:

  • The framework or language version is unsupported and the upgrade path would touch most of the code anyway.
  • The application cannot be made to run from the repository, and reconstructing it costs more than rewriting it.
  • Security flaws are structural: no access control layer, secrets in the code, data models that cannot enforce who sees what.
  • The product direction has changed enough that most existing features will be removed.
  • Nobody can find a part of the system worth keeping after a careful read, not a quick glance.

Even then, the rebuild is rarely all at once. The usual pattern is to put the old system behind a stable interface and replace it piece by piece, keeping users on a working product throughout. That is the approach we take in application modernization work: audit first, stabilise, then move to a modern stack without a risky rewrite.

The sequence to follow when you inherit code

Taking over a codebase from a previous developer succeeds when the order is right: secure ownership of every account and rotate the secrets, prove the app runs from the repository on a clean machine, commission an audit that ends in a prioritised plan, stabilise deployment and the riskiest parts, and only then finish the features you came for. Skip a step and you pay for it later, usually in production.

If you have inherited an app, or are about to, book a free 30-minute discovery call. A senior engineer talks through what you have and what you need, and we send a written approach, timeline and estimate within two business days.