How to Get Your Code Back From a Development Agency

Getting your code back from a development agency comes down to three things:

  1. Knowing what “your code” actually includes. It is much more than a zip file.
  2. Having a written handover checklist before you announce you are leaving.
  3. Verifying that what you received can actually be built and run by someone else.

Most handovers fail on the third one. Founders discover it months later, when a new team opens the box.

We have been on the receiving end of dozens of these handovers. Here is what a complete one looks like, and how to get it.

“My code” is more than code

When founders ask for their code, agencies often hand over a zip file of source files and consider the matter closed. That zip file is maybe half of what you paid for. A complete handover includes:

  1. The source code, as a repository transfer, not a zip. A Git repository carries the full history of every change. That history is real value: it tells the next developer why things are the way they are. Ask for the GitHub/GitLab repository to be transferred to an organization you own.
  2. Documentation. README files, setup instructions, architecture notes, API documentation. If none exists, ask for a written build-and-deploy guide as part of the handover.
  3. The database and your data. A current export, plus the schema. Your customer data is yours.
  4. Design files. Figma, Sketch, or whatever was used. Ask for ownership transfer of the design project, not exported images.
  5. Account ownership transfers. Hosting (AWS, Azure, etc.), domain registrar, app store accounts, email/SMS providers, analytics, error tracking. Each account should end up owned by you with the agency removed.
  6. Environment configuration. The app almost certainly depends on configuration values and secret keys that live outside the code. Without them, the code will not run. Ask explicitly for environment configuration documentation, with secrets rotated to new values you control.
  7. A list of third-party services and licenses, with costs and renewal dates, so nothing expires silently in three months.

Copy this list into your handover request email. Agencies do complete handovers for clients who ask precisely.

Read your contract before you send anything

Two clauses decide how this goes.

The IP clause. In Canada, a contractor owns the copyright in code they write unless it is assigned to you in writing. Most professional agency contracts do assign IP, but many tie the assignment to full payment. If you are mid-dispute and withholding an invoice, understand that you may be withholding your own code. We are not lawyers; if real money is at stake, spend an hour with one before escalating.

The termination clause. Check the notice period and whether there are early-exit fees. Some agencies lock clients into 12-month terms with monthly fees that run whether or not work continues. Know your exposure before you announce the departure.

The escalation ladder

Work this top to bottom. Most situations resolve on the first or second rung.

  1. The professional request. Email the handover checklist with a reasonable deadline (10 business days is fair). Be polite and assume good faith. Most agencies comply, because handovers are normal business.
  2. The structured exit. If the agency is slow but not hostile, offer to pay for handover time at their hourly rate. A few hours of paid transition work is cheap compared to what missing pieces cost you later. It also removes their last excuse.
  3. The formal letter. If the deadline passes, send a letter referencing the contract’s IP clause and a final deadline. The shift from email to letter changes how seriously it gets read.
  4. The lawyer’s letter. A demand letter typically costs a few hundred dollars and resolves a large share of standoffs, because agencies know a judge will read their contract the same way you do.
  5. Court. Small claims (up to $100,000 in Alberta) for the value of withheld work. By this rung you should also be planning as if the code is not coming back; read our guide on what to do when your developer disappears for the recovery playbook.

When they refuse, or when there is nothing to give

Two hard cases deserve straight talk.

The proprietary platform problem. If your app was built on the agency’s in-house platform, there may be no usable code to hand over. The app only runs inside their system, and your contract probably allowed it. Your options:

  • Negotiate an export
  • Pay a licensing fee to stay
  • Rebuild on open technology

Painful, all three. The only real cure is prevention: never sign a contract where you cannot leave with a working product.

The “it’s complicated” handover. Sometimes you receive the code and your new developer cannot make it run. Missing configuration, undocumented services, dependencies on the agency’s accounts. Before you accept any handover as final, have an independent developer verify it: can they build the app from what was delivered, and does it run? This is exactly the kind of thing a second opinion on your project covers. Twenty minutes of verification beats discovering the gaps after the agency has moved on.

The acceptance test

A handover is complete when you can answer yes to all five:

  1. The repository (with history) lives in an account I own.
  2. A developer who has never seen this project can build and deploy it using only what was handed over.
  3. Every third-party account is owned by me, with secrets rotated.
  4. I have a current database export and the schema.
  5. The agency’s access to everything has been removed.

Until then, keep the file open.

Frequently asked questions

The agency says the code is theirs because I haven’t paid the final invoice. Are they right? Possibly, if the contract ties IP transfer to payment. Paying a disputed final invoice is sometimes the cheapest way to own your code; fighting on principle can cost more than the invoice. Get the contract read by a lawyer before deciding.

Can I just have my new developer rebuild it and skip the fight? Sometimes that is the rational choice, especially for smaller builds. Compare the legal-fight cost against the rebuild cost honestly. But always attempt the professional request first; most agencies hand over without drama, and the repository history is worth having.

What are secret keys and why do I keep hearing about them? They are the passwords your app uses to talk to other services (payments, email, maps). They are deliberately kept out of the code, so a code handover without them produces an app that will not run. Ask for them explicitly, then change them.

Do I owe the agency anything for handover work? Reasonable handover effort is usually billable time unless your contract says otherwise. Paying for a clean, verified handover is almost always worth it.

If you are partway through a messy handover and not sure whether what you have received is complete, we will look at it with you.

Our second opinion on your project is a 30-minute call with our CTO.

We will tell you what is missing, what to ask for, and whether what you have can be built on.

Even if you never hire us, you will leave with a checklist.

Leave with everything you paid for.