You have just paid an agency to build your product. Then you ask for the repository and the AWS login and the reply is slower than it should be. That pause is where code ownership agency work stops being a legal footnote and becomes an operational risk. When the code lives in the agency's GitHub organisation and the cloud bill arrives in their name, you do not control the thing you funded. Switching vendors gets harder, costs climb, and a dispute can freeze your product while lawyers talk. Founders who are not technical are the most exposed, because nothing in the demo reveals who holds the keys. This guide breaks down who owns what in agency work, the contract language that decides it, the repository and cloud account settings that prove it, and the questions to ask before you sign anything.
The Two Things People Mean by Ownership
Ownership in agency work splits into two separate questions, and most disputes happen because nobody separated them. The first is legal ownership: who holds the copyright in the code and the intellectual property in the design. The second is practical control: who can log in, push a commit, change a setting or move the data.
You can hold perfect legal title to code you cannot access, and you can have full admin access to code someone else owns. Either one alone is not enough. A startup that owns the IP but has no repository access still depends on the agency for every deploy. A startup with access but a vague contract can be asked to stop using the code it paid for.
The fix is to treat both as deliverables. The contract establishes title, and the setup establishes control. Check them separately, because a friendly agency today can become a slow one after a budget cut, an acquisition or a disagreement.
What the Contract Must Say About Code Ownership in Agency Work
In the US, copyright in a piece of software belongs to the author unless it is assigned in writing. An agency is the author in the eyes of the law until the contract says otherwise. A line in a proposal or a sentence on an invoice is not a substitute for assignment language in the signed agreement.
Read the intellectual property clause yourself and look for the words assign and upon payment. The cleanest version assigns all right, title and interest in the custom work to you, effective when you pay the relevant invoice. Anything softer, such as a license to use, leaves the agency holding the asset.
- Assignment, not license: The clause should transfer ownership to you, not grant you permission to use the work while the agency keeps the copyright.
- Trigger and timing: Ownership should pass on payment of each invoice, so partial delivery does not leave earlier work in limbo.
- Pre-existing components: Agencies reuse libraries, design systems and internal tools. The contract should list any background IP and grant you a perpetual, irrevocable license to use it as part of your product.
- Third-party and open source: Require a written inventory of open source dependencies and their licenses, so a copyleft license does not surface after launch.
- Handover obligation: Add a clause that the agency will transfer repositories, cloud accounts, domains and credentials within a set number of days of a written request.
- Exit assistance: Specify a short paid or unpaid transition window, such as 10 business days of handover support, so a departure does not become an outage.
The Repository Should Live in Your Organisation
The simplest way to make code ownership real is to make the repository yours from day one. Create the GitHub, GitLab or Bitbucket organisation under your company's name and email domain, then invite the agency as a member. The agency commits into your organisation, not theirs.
This one decision changes the balance at the end of the engagement. If you ever need to part ways, you revoke their access and the code stays exactly where it is, with full commit history. There is no export request, no archive file of uncertain completeness and no waiting on someone else's schedule.
Set the basics while you are there. Require two-factor authentication for every member, keep an owner seat on your own account rather than the agency's, and confirm that CI/CD pipelines, environment variables and deployment keys are stored in your organisation's settings, not in a personal account. If the agency uses its own private packages or internal tooling, ask for them to be mirrored into your organisation or documented before launch.
Your AWS Account Should Be in Your Name on Your Card
Cloud accounts follow the same logic as repositories, and the stakes are higher because the account holds your data and your bill. The account should be created with your company's email, your billing method and your root credentials, with the agency invited as an IAM user or role. You grant access, and you can revoke it.
Agencies sometimes build in their own AWS organisation and give the client a sub-account. That arrangement is convenient for the agency and awkward for you. Leaving means migrating resources, rebuilding IAM, moving data out of buckets and reissuing certificates, and the migration is rarely free.
Ask for a short written record of the account setup: the account ID, who holds root, which roles the agency uses, where secrets are stored and how backups run. If the agency set up infrastructure as code, that code should live in your repository so the environment can be rebuilt without them. The same review applies to domains, DNS, email sending, payment processor accounts and app store listings. Each one is a key, and every key should be in your name.
- Root account: Root credentials belong to a founder or a company-controlled inbox, never to an agency employee's personal email.
- Billing: The card on file is yours, so you see the real cost and keep the account if the relationship ends.
- IAM access: The agency gets named roles with the permissions it needs, and you can disable them in seconds.
- Secrets: API keys and database passwords sit in your account's secret manager, not in a shared document or a chat thread.
- Backups and DNS: Confirm who controls the database snapshots and the DNS records, because those are the two things hardest to recover.
Agency Managed Setup vs Client Owned Setup
The trade-off is real, and it is worth naming plainly. An agency managed setup can be faster to start because the agency uses its existing templates and accounts. A client owned setup takes an extra hour of setup and pays for itself the first time anything changes.
- Repository location Agency's organisation, Your organisation
- Cloud account Agency's AWS account, you as a guest, Your AWS account, agency as a guest
- Billing Agency invoices you for cloud spend, Cloud charges hit your card directly
- Access control Agency grants and revokes, You grant and revoke
- Exit cost Migration project, often billed, Revoke access, nothing to migrate
- Visibility Limited to what the agency reports, Full console, logs and cost data
What to Check Before You Sign and Again at Handover
Ownership is easy to promise and easy to lose in the details. Run the same short checklist before the contract is signed and again on the day the engagement ends. It takes an afternoon and saves months.
If you are not technical, ask the agency to walk you through each item on a screen share and send a one-page summary afterwards. A partner who expects to hand over control will not hesitate. A partner who does will give vague answers about process.
- Contract: Signed assignment clause, background IP list, open source inventory and a written handover obligation.
- Repository: Your organisation, your owner seat, full commit history visible to you.
- Cloud: Your account, your billing, root in your control, infrastructure as code in your repository.
- Credentials: Domains, DNS, app store accounts, payment and email services all registered to your company.
- Documentation: A short runbook covering deploys, backups, secrets and who to call if something breaks.
- Access review: Remove agency accounts you no longer need and rotate any shared secrets on the way out.
Why This Matters More for Early Stage Startups
A larger company can absorb a migration project. A pre-seed team cannot. If your code and cloud account sit with an agency, a change of vendor becomes a fundraising problem, because the product you are showing investors is not fully in your control.
Due diligence makes this concrete. Acquirers and investors ask for repository access, cloud account details and confirmation that the company owns its IP. Missing answers delay deals or reduce the price. Getting the setup right at the start costs almost nothing; fixing it later costs engineering time you would rather spend on customers.
The same logic applies to accessibility and security records. If a WCAG audit or a dependency scan was done by an agency, the written report belongs in your files, not only in theirs. Ownership is a habit that covers every artifact the engagement produces.
Frequently Asked Questions (FAQ)
- Who owns the code an agency writes for me? By default the agency holds copyright as the author. Ownership transfers to you only if the contract assigns it in writing, ideally on payment.
- Can I ask for the code if the contract does not mention ownership? You can ask, but you may have limited legal claim. Negotiate assignment language before work starts rather than after a dispute.
- Should the AWS account be in my name or the agency's? Yours. The account holds your data and your bill, and owning it means you can revoke access without a migration project.
- What if the agency uses its own tools and libraries? That is normal. Ask for a list of background IP and a perpetual license to use it inside your product, plus documentation so you are not dependent on their support.
- How long should handover take? A well set up engagement needs only access changes, which take minutes. Write a target into the contract, such as 10 business days for documentation and transition support.
Conclusion
Code ownership in agency work is decided by two things you control: the assignment clause in your contract and the account setup you insist on before the first commit. Get both right and the end of an engagement is a matter of revoking access, not negotiating for your own product. Get them wrong and you may find that the code you paid for is legally yours but practically out of reach.
Build With a Partner Who Hands You the Keys
The AI Max Startups works the way ownership should work. The repository sits in your organisation, the AWS account is in your name on your billing, and access is granted by you and can be revoked. Nothing has to be migrated on the way out because nothing was ever held back. If you want an engineering partner for your next build, run or protect project, talk to the senior engineers who will actually do the work.