Yes, you can sell or license an old codebase to AI labs and the data companies that supply them. One closed startup's founder netted roughly $25,000 for his code base, MIT Technology Review reported in October 2026, and published program ranges for private code run from about $10K to $500K. Before buyers look at size, they check history, linked issues, ownership, third-party code and secrets in the commit log.
This post walks through why labs want private code, the checks a buyer's intake runs, and the commands to run them yourself first.
Why do AI labs buy private code?
Public code is already in every lab's training data. What labs lack is private production code with its history, because that history can be turned into tasks for coding agents: here is the repository at a commit, here is the bug report, produce the fix and pass the tests.
The SWE-bench benchmark shows the shape. It built 2,294 tasks from real GitHub issues and the pull requests that resolved them (paper). Each task instance on its dataset card carries these fields, among others:
| Field | What it holds |
|---|---|
repo, base_commit | The repository and the commit before the fix |
problem_statement | The issue title and body |
hints_text | Issue comments made before the fix began |
patch | The gold patch from the pull request, minus tests |
test_patch | The tests the pull request added |
FAIL_TO_PASS, PASS_TO_PASS | Tests that the fix must turn green, and tests that must stay green |
Every row needs an issue, a commit that fixed it and a test that proves it. A squashed snapshot of main produces none of them. That is why buyers value code by the tasks it can yield, not by lines: valuations rest on "research theses" estimating how many useful tasks come from, say, 100,000 lines of code, a buyer at Surge AI told MIT Technology Review.
What do code buyers publish about price and requirements?
Terms change often. These are as published, with dates:
| Route | Published terms | Source |
|---|---|---|
| Mercor, private-code listing | $50K to $500K, companies with 15 to 500 staff (October 2026) | Our study of 8 programs |
| Turing Project Lazarus, codebase track | October 2026: $10K to $100K+, 50,000+ lines, English comments and issues, human-written pull requests, no LLM-written code | Our Turing guide |
| Turing Project Lazarus, as of November 2026 | Revenue share on each sale, nothing upfront, non-exclusive licenses, Turing sells alone for the first 90 days, sample QC within 5 business days | Lazarus process page |
| SimpleClosure Asset Hub (wind-downs) | No price list; one code base sold for about $25,000 | MIT Technology Review |
Turing's current site prices from a sample and no longer lists the October line-count rules, so confirm requirements before preparing anything.
What does a buyer's intake check first?
In our reading of published requirements and reports, intake comes down to six questions. You can answer most of them from a terminal in ten minutes.
- Is the history intact? A full git history with real commit messages, not a single import commit.
- Do commits link to issues? Linked issues and pull request reviews are what turn history into tasks.
- Does it build and do tests run? Environments are often delivered as Docker containers, Epoch AI reports, so a repository that builds in a container today is easier to use.
- Does the company own all of it? Code from contractors or agencies belongs to the company only if their contracts assigned the IP. Client work often belongs to the client.
- How much is really yours? SimpleClosure, which has seen nearly 500 million lines of code across 3,000 repositories, says roughly 37% of raw code disappeared after removing third-party and generated code and internal duplication (SimpleClosure).
- Are there secrets or customer data in history? A key deleted from
HEADis still in every older commit.
Here is a quick self-check. Run it from the repository root:
# 1. History depth and span git rev-list --count HEAD git log --reverse --format='%ad' --date=short | head -1 # first commit git log -1 --format='%ad' --date=short # last commit # 2. Share of commits that reference an issue (#123 or JIRA-style KEY-123) total=$(git rev-list --count HEAD) linked=$(git log --format=%s | grep -cE '#[0-9]+|[A-Z][A-Z0-9]+-[0-9]+') echo "$linked of $total commits reference an issue" # 4. Who wrote it: look for agency, contractor or client email domains git shortlog -sne --all | head -25 # 6. Secrets anywhere in history (gitleaks scans patches from git log -p) gitleaks git -v --report-format json --report-path leaks.json . The git shortlog output is the fastest ownership check you can do. Every email domain that is not your company's is a contract you need to find. For check 5, list vendored directories (vendor/, third_party/, copied SDKs) and generated files, and note their licenses. Copyleft licenses such as the AGPL carry conditions a buyer will ask about.
If gitleaks finds something, GitHub's guide to removing sensitive data says to revoke or rotate the secret first. It then recommends rewriting history with git-filter-repo, for example:
git-filter-repo --sensitive-data-removal --invert-paths --path config/prod.env Rewriting history changes commit hashes from that point on. Do it on a copy prepared for the buyer, not on the repository your team still pushes to.
What lowers the price, or ends the deal?
The common problems in the reports and published terms above are about rights as often as quality:
- Unassigned contractor code in a core module. Without an IP assignment, the contractor may still own it.
- Client work built under a services agreement. Exclude it unless the contract allows reuse.
- Code that no longer builds, or tests that were deleted years ago.
- A squashed or re-imported history. It removes the sequence buyers pay for. SimpleClosure says buyers "increasingly" want to see work in sequence.
- Generic code. SimpleClosure reports roughly half of what it has analyzed is TypeScript or JavaScript, and says less common languages and specialized datasets are potentially more interesting.
- Competitive exposure. For a company still running the product, a license should limit use to model training, ban redistribution and require deletion at the end of the term.
The guide to selling source code for AI training has a fuller list of ownership and license checks.
Common questions
Do I have to hand over the code to get a price?
No. A first conversation needs a description: languages and frameworks, approximate size, years of history, number of contributors, whether issues and pull requests are linked, and whether the build works. Programs that sample, such as Turing's, ask for a small sample under a mutual NDA before any full transfer.
Is code from AI coding tools a problem?
It can be. In October 2026 Turing's codebase track asked for human-written pull requests and no LLM-written code. Other programs publish no rule. If your history mixes both, be ready to say roughly when AI coding tools came into use and which parts of the repository they touched.
Should an operating company sell or license its code?
License. A license grants a buyer defined rights to use a copy while the company keeps ownership, which matters if the code still runs a product. Outright sale fits a company that is closing and no longer needs the code.
Does the issue tracker need to come with the code?
It does not have to, but it usually raises value. An issue linked to the commit that fixed it is a ready-made task with a reference answer. If the company is closing, export the tracker while someone still has admin access.
If you want a rough range for your code and the records around it, our free estimate asks six questions and needs no files.
Origin Data Partners is an independent data partner that helps companies get their data bought. We are independent of the companies named here, and a buyer may pay Origin when a deal closes.
