Who owns the code when you hire a software agency?
Whoever the contract says. In the US, code written by an outside contractor usually belongs to the contractor unless there is a signed, written assignment, because software rarely qualifies as a work made for hire when the author is not your employee. Make sure your contract assigns the code and IP to you, and that you hold the accounts it runs on.
Last updated
Why the default is not what most buyers expect
Under US copyright law, work an employee creates as part of their job belongs to the employer. Work by an independent contractor or agency only counts as a work made for hire in a short list of categories, and only with a signed agreement. Most custom software is not in that list, so ownership has to move by a written assignment.
Other countries have their own rules, but the safe pattern is the same everywhere: do not rely on defaults, put ownership in the contract.
What the contract should cover
Ask any vendor, including us, to put these in writing before the build starts:
- 1Assignment of copyright and other IP in the code, designs and documents made for you, usually taking effect on payment.
- 2A licence for anything the vendor already owned and reused, such as internal libraries, so you can keep using and changing it.
- 3A list of open-source components and their licences, and no components whose licence conflicts with how you plan to use the software.
- 4Your own accounts: the code repository, cloud hosting, domains, app store listings and third-party APIs registered to your company, with the vendor added as a user.
- 5Handover: documentation, build and deploy steps, and credentials, so another team could take over.
- 6Third-party assets such as fonts, icons, stock images and paid APIs, and who holds those licences.
Where it usually goes wrong
The common problem is not a vendor refusing to hand over code. It is a project where the repository, the hosting and the app store account were all opened in the vendor's name for speed, and nobody moved them. Asking for your own accounts from day one avoids the whole issue.
For larger or regulated systems, some buyers also use source-code escrow, where a copy of the code is held by a third party and released to them if the vendor cannot continue.
Check it for your case.
Read the official text.
- US Copyright Office, Circular 30: Works Made for Hirechecked 2026-10-25
- 17 U.S.C. 101, definition of a work made for hire (Cornell LII)checked 2026-10-25
Common follow-up questions.
Does paying for the software mean I own it?
Not on its own. Payment buys the work, but ownership of the copyright moves only if the contract says so, usually through a written assignment.
Can the agency reuse parts of my code for other clients?
It depends on the contract. Many contracts let the vendor keep and reuse general-purpose tools they brought in, while code written specifically for you is assigned to you. Spell out which is which.
What about code written with AI coding assistants?
Ownership rules for AI-assisted code are still being worked out in several countries. Make sure the contract assigns whatever rights the vendor has in the output, and that the vendor checks generated code for licence problems.
Related questions and guides.
- How do I reduce LLM API costs?Question
- Does my app need to be HIPAA compliant?Question
- Is my AI system high-risk under the EU AI Act?Question
- AI agent vs workflow automationComparison
- RAG vs fine-tuningComparison
- GlossaryEvery term, in plain words.
- Software by industrySystems we build per industry, with guides and tools.
- Embedded engineersOceanLab engineers working inside your team.
- Talk to OceanLabTell us about the build and we reply by email.