Source Code Ownership Agreement: What It Must Cover
A source code ownership agreement must assign copyright, list deliverables and secure handover. Here is what to check before you sign.
The question arrives in an awkward place. Sometimes it's a due diligence pack for a funding round, where a lawyer asks the founder to confirm the business owns the platform it has been selling for three years. Sometimes it's the week a chief technology officer (CTO) decides to replace an underperforming vendor and asks for the repository, only to hear that access "can be discussed". Sometimes it's a private equity (PE) backed company trying to move a product onto its own cloud accounts and finding that nobody can rebuild it from source.
All three are the same question in different clothing. Does the business own the software, or does it merely have permission to use it? The answer sits in a source code ownership agreement, and it's often uncomfortable.
Here's the test this article works towards. An assignment clause only counts if the buyer can rebuild and run the software without the former vendor. Title on paper is worth very little if the build fails the moment the outgoing team logs off.
Why Paying for Code Does Not Make It Yours
An illustrative scenario, not a real engagement. A company pays a development vendor for an 18-month platform build. Invoices are settled, milestone documents are signed, the product goes live and customers use it daily. Eighteen months later the company wants to change provider and asks for the repository. The reply is courteous and vague. The vendor still holds the copyright, and what the company bought was permission to use the software, not the software itself.
That scenario is hypothetical, but it isn't fanciful. It describes the most common ownership failure in custom software, and it starts with a reasonable assumption that happens to be wrong.

Why code behaves differently from a delivered widget
Buy a physical asset and delivery plus payment transfers the thing itself. Software doesn't work that way, because the asset is a bundle of intellectual property rights, and those rights start somewhere specific. Computer code is protected as a literary work under the Berne Convention, and both source code and object code carry copyright, which gives the owner the exclusive rights to use, copy, modify and distribute the code, as WIPO's handbook on intellectual property in mobile apps sets out.
The person who wrote the code, or the company that employed them, is usually the first owner. Payment moves money. It doesn't move title. WIPO is equally clear that where a development firm writes application code, that firm may initially own the rights unless they are assigned to the commissioning party.
Most of the confusion comes from treating two separate instruments as one. A licence permits specified use while ownership stays with the original rights holder. An assignment transfers the relevant exploitation rights to the assignee. A customer can therefore pay in full for a platform and still hold only a limited licence, unless the contract expressly assigns the copyright or sets up another valid ownership mechanism.
Practical rule: if the draft never uses the word "assign", assume the developer kept the copyright and the client bought a licence.
Three checks you can run today
Pull out your current agreement and answer these three questions in writing.
- Who wrote each part: bespoke code, the developer's reusable tools and libraries, and third-party components don't share the same owner by default.
- What the contract says about transfer: look for an assignment clause and a named moment when title passes. Payment alone isn't it.
- Whether each deliverable is named: a repository is not a deliverable. Build scripts, infrastructure-as-code, test suites and documentation all need naming.
If any answer is "we assumed", that's the gap. Filling it takes more than legal wording, which is why rebuilding after a development partner underdelivers is a contract problem before it becomes a technical one.
What the Agreement Must Cover, Clause by Clause
Use the draft as an exit test. Imagine the former vendor disappears tomorrow. Could the buyer rebuild the product, run it, change it and support it without asking that vendor for permission, access or hidden knowledge? Each clause should make that answer easier.
The table below is the clause reference to hold against a draft. Mark each row as covered, silent or ambiguous, and treat silence as a defect.
| Provision | What the wording must say | Gap to watch |
|---|---|---|
| Deliverables | Named list: source code, build scripts, infrastructure-as-code, tests, documentation, model weights | Only the repository is named |
| Assignment | Present assignment of copyright, with a fallback clause | Payment treated as transfer |
| Transfer event | Milestone or date when title passes, linked to payment | Left undefined |
| Contributors | Employees and subcontractors sign matching assignments | Developer cannot pass title it never obtained |
| Background technology | Reusable tools listed as retained, with a perpetual licence where embedded | Tools blur into the deliverable |
| Third-party components | Inventory and licence identifier for each release | Open-source terms unrecorded |
| Documentation and credentials | Repositories, commit history, build steps, deployment access | Access given without procedures |
| Maintenance after handover | Named owner for notices, SBOMs and vulnerability reports | Assumed, not assigned |
The underlying structure is not new. WIPO's software protection provisions put weight on separating commissioned work, pre-existing materials and third-party components, because blurring them is how buyers end up with rights nobody can enforce.
Start with the deliverable list, because it defines the object of the deal. “The source code” is too thin. A developer can read that phrase and argue that build scripts, test suites or deployment configuration were never part of the product. Name the full set: source code, build scripts, infrastructure-as-code, test suites, technical documentation and deployment configuration. For AI systems, add model weights, training pipelines and prompts, because those artefacts may carry more value than the application layer around them.
Assignment answers whose rights move. The clause should use clear present wording, not vague promises to cooperate later. A fallback clause matters because a work-made-for-hire argument may fail in one jurisdiction while an assignment still works. The buyer wants a route that survives that difference.
The transfer event answers when the move happens. Tie title to a milestone or date and to payment for the relevant work. Without that link, the buyer can pay for something it does not yet own, then argue about the moment of ownership later.
A pattern to discuss with counsel: “The Developer assigns to the Client all right, title and interest in the Deliverables with effect from payment of Milestone 3.” This is hypothetical wording for a conversation, not legal drafting.
The smaller clauses are where ownership becomes testable. Contributors look administrative until a handover begins. A developer cannot pass title it never obtained, so the agreement should require matching assignments and confidentiality terms from every employee and subcontractor who touches the code. If that chain is missing, the buyer receives a promise with a hole in it.
Background technology needs the same care. List the developer's reusable tools, frameworks and know-how as retained, then grant a perpetual licence where those materials are embedded in the deliverable. Otherwise every rebuild becomes a negotiation about whose framework is inside the product.
Third-party components need an inventory tied to each release, with licence identifiers. Documentation and credentials need procedures, not just access: repositories, commit history, build steps and deployment routes should be named. Maintenance also needs an owner for notices, SBOMs and vulnerability reports. Handover works like moving house. The keys matter, but so do the plans, the maintenance schedule and the name of the person who knows where the stopcock is.
If a starting draft would help, download a developer contract template from Coto & Waddington, Attorneys at Law, and use it as a comparison against your own draft rather than as a replacement for advice.
Ownership Defaults in the UK, US and China
The default owner of commissioned code depends on two things buyers rarely write down: the governing law of the contract and where the work was done. The same sentence can produce different results in three markets.
| Market | Default position | What makes the transfer valid | Drafting consequence |
|---|---|---|---|
| United Kingdom | Creator is first owner; contractor usually keeps copyright | Written assignment of copyright in the bespoke code | Assign expressly; don't rely on payment or delivery |
| United States | Employer owns staff code; commissioned work is work made for hire only in nine categories | Signed written agreement stating the work-made-for-hire result | Add a present assignment as fallback |
| China | Commissioned party owns where no written contract or ownership term exists | Written contract stating who owns the code | State owner, transfer point and coverage of changes |
| Any market | Default varies and can't safely be assumed from payment | Explicit assignment plus contributor assignments | Apply the strictest test across every jurisdiction involved |
The United Kingdom protects the writer
UK government guidance on ownership of copyright works states that the creator is normally the first copyright owner unless the commissioning contract says otherwise in writing. It also notes that a contractor working under a contract for services usually retains copyright unless the contract changes that position. Payment, delivery and an implied licence change nothing. The transfer happens in writing or it doesn't happen.
The United States narrows work made for hire
US law looks generous to buyers until the detail bites. US Copyright Office Circular 30 explains that a commissioned work qualifies as a work made for hire only if it falls within one of nine statutory categories and the parties sign a written agreement expressly stating that result. Custom software may not fit those categories, which is why a present assignment of copyright should sit alongside the work-made-for-hire language as a fallback.
Staff code adds a second variable. The US Copyright Office compendium confirms that computer programmes are copyrightable and that work-made-for-hire ownership places initial copyright with the employer rather than the individual creator, provided the work falls within the scope of employment. Who employed the writer therefore matters as much as what the contract says.
China defaults to the developer when the contract is silent
China applies an explicit written-agreement rule. Article 11 of China's Regulations on the Protection of Computer Software provides that ownership of copyright in commissioned software must be agreed in a written contract between the commissioning and commissioned parties. Where there is no written contract, or the contract contains no explicit ownership term, copyright belongs to the commissioned party, which is the developer.
A buyer operating across Asia-Pacific shouldn't assume that commissioning and paying creates ownership. State who owns the code, when ownership transfers, and whether the transfer covers modifications, documentation and other project materials.
Honest limit: formalities and the treatment of moral rights differ by jurisdiction. This comparison is a starting point for a conversation with counsel qualified in each market, not legal advice in any of them.
Third-Party Components and AI-Generated Code
Assignment language assumes every deliverable is copyrightable and that the developer is in a position to assign it. Neither assumption holds any more.
Can a client own code a model wrote
A source code ownership agreement doesn't automatically deliver exclusive, enforceable ownership of an AI-built codebase. Standard clauses assigning "all right, title and interest" read as though each file were written by a person, while current US doctrine requires human authorship. Prompts alone generally don't make the user the author, and human selection, arrangement, modification or review may attract protection only for those human contributions, as analysis of copyright ownership in AI coding explains.
That gap shows up in a room full of people asking the same question. A 2024 worldwide survey of 574 software developers examined perceptions of ownership of AI-generated code and the associated copyright questions, and the disagreement it found is the disagreement now turning up in contracts.

The practical fix is a provenance schedule attached to the agreement. For each module or file, record whether it was human-written, AI-generated, adapted from third-party material or produced with an AI coding tool. Name the tools and models used, and keep dated evidence of human review. Then add contractual rights on top: written permission to use, modify, maintain and commercialise code that may never qualify for copyright protection.
The question that matters: not only "who owns the code" but what rights and evidence an acquirer, regulator, insurer or replacement engineering team will need to rely on it.
The bill of materials that catches a copyleft surprise
Ownership of source code doesn't establish the right to redistribute every component inside the system. Open-source and third-party dependencies impose attribution, notice, source-disclosure and reciprocal-licensing obligations, and the license best practices from the Linux Foundation recommend scanning both first-party source and dependencies, recording applicable licences, preserving attribution and generating a software bill of materials (SBOM) in the CI/CD pipeline.
SPDX is the standard for communicating component provenance and licensing, recognised as ISO/IEC 5962:2021. A machine-readable inventory for every release should carry package name, version, supplier, licence identifier, copyright notices, source-availability obligations and the dependency path by which each component entered the product.
Say a payments platform ships a release with a permissively licensed top-level library, and one of its transitive dependencies is a strong copyleft licence. Nobody notices until a buyer's counsel asks whether the product can be distributed as a commercial service. A dependency-level inventory flags that before release rather than after a term sheet.
Teams weighing whether to build those AI features at all will recognise the same ownership questions in choosing an AI automation partner.
Escrow, Assignment and Licences Compared
Assignment settles who owns the code. A licence defines permitted use. Escrow provides access to deposited materials when an agreed trigger occurs. Judge the combination by one exit question: can the buyer rebuild and run the software without the former vendor?
| Mechanism | Who holds the rights | Access for the buyer | Best use |
|---|---|---|---|
| Copyright assignment | Buyer, once title passes | Through the agreed handover package | Bespoke code the buyer should own |
| Licence | Rights holder retains ownership | Within the licence scope | Retained tools and third-party components |
| Source-code escrow | Neutral agent holds a copy; ownership stays unchanged | After a defined release trigger | Continuity if the developer fails to perform |
| Assignment plus escrow | Buyer owns assigned code; agent holds a copy | Handover access plus release on trigger | Transitions with ongoing vendor dependency |
The software escrow guideline from the Saudi Communications, Space and Technology Commission describes a neutral arrangement holding source code, documentation and technical materials for release under specified conditions, including material failure to perform.
What escrow terms must define
Specify the release trigger, evidence needed, decision process, decision-maker, deposited materials and permitted use after release. The buyer needs to know both how to obtain the package and what it may do with it.
Set the update frequency and verification requirements too. A stale deposit may omit the running product's changes; an unbuildable copy leaves the buyer with files rather than a working exit. Escrow covers developer failure, assignment covers ownership, and handover terms define what the buyer receives.
For most vendor transitions, combine all three: assign bespoke code, license retained tools and third-party components, and use escrow to preserve access if the developer fails to perform.
Before signing, check the neutral agent's fees, verification rights and release procedure. Confirm who decides whether the trigger has occurred, what evidence they require and whether the released package supports rebuilding and running the software.
Test the Handover and Confirm Terms Before You Sign
Your team has repository access and a signed assignment, but the build still depends on the outgoing developer's laptop. An effective exit requires the buyer to rebuild, deploy and run the software independently. Treat the handover as a practical acceptance test.
WIPO's guidance on securing IP ownership with a software development agreement identifies source code, updates, related IP, assignment mechanisms and open-source compliance as matters to cover. Turn those contractual commitments into evidence that the receiving team can use.
Run these seven checks before signing.

- Request a current dependency and licence bill of materials. Reconcile it against the release notes. Resolve unlisted packages before accepting the handover.
- Verify the repository history. Confirm that the full commit history is present. Record the exact starting version so both teams assess the same code.
- Rebuild in a clean environment. Build the handed-over source on infrastructure the developer has never touched, using the supplied infrastructure-as-code and deployment configuration. Record missing steps and dependencies.
- Inventory non-portable services. List model APIs, hosted tools, data stores and third-party accounts. Confirm what transfers, what needs recreating, what requires data-transfer rights and what the buyer must buy again.
- Confirm credentials and key rotation. Establish how secrets will be rotated, who retains administrator rights and how old keys will be withdrawn. Include the secrets-management procedure in the handover.
- Check the operational record exists. Give runbooks, test suites, model weights, evaluation datasets and records, and major design decisions a named location accessible to the receiving team.
- Write a time-bound transition obligation. Specify owners, deliverables and dates, including a named vendor contact who will answer questions during the transition window.
Repository access alone leaves these dependencies unresolved. If cooperation breaks down, legal steps when developers stop cooperating explains the legal procedures that may become relevant. Agreeing the practical obligations beforehand gives both teams a clearer basis for completing the transition.
Five terms to confirm before the signature
Use the results of those checks to settle acceptance and support arrangements:
- A passed rebuild test: record the tested commit, environment and result, with outstanding failures resolved before the final invoice clears.
- The operational record location: identify where the receiving team will find deployment instructions, tests, evaluations and decision history.
- The transition contact: name the vendor representative responsible for answering questions, alongside the receiving owner.
- The transition window: set fixed dates for assistance and completion, with responsibility for each outstanding item.
- The access cutover: confirm who will hold administrator rights, when credentials change and how old access will be removed.
These are practical acceptance conditions. Include their owners, dates and unresolved dependencies in a wider software risk analysis.
For a stalled platform, Grail Computer Labs audits inherited code, data, infrastructure and product documents before rebuilding, then takes responsibility for the product, codebase, infrastructure, testing and production through a managed delivery relationship in which the same team keeps shipping.
Paying an invoice does not settle ownership. Have counsel qualified in each relevant market review the assignment wording, and require evidence that the receiving team can rebuild and operate the software without the former vendor.