Build vs Buy vs Fork With AI Coding Agents in 2026
The Short Answer
There are three options, not two, and in 2026 the middle one is usually right.
| Option | What you get | What you owe | Best when |
|---|---|---|---|
| Buy | Capability plus obligations | A licence fee | The vendor’s SLA, certification or liability transfer is what you actually need |
| Fork | An 80% solution with history | Maintenance of your delta | A permissive OSS project already exists in the category |
| Build | Exactly your logic | The entire lifecycle | The workflow encodes something specific to your business |
Coding agents changed the cost of construction. They did not change the cost of ownership. Every framework below is downstream of that one sentence.
Why the Decision Changed
McKinsey’s 2026 global survey found 32% of organisations declined at least one software purchase because agentic coding tools let them build it in-house — around 41% in the technology sector. In the same survey, the share reporting EBIT impact from AI stayed flat at 37%.
A third of enterprises changed their buying behaviour and the profit line did not move. That is not an argument against building. It is an argument against building for the wrong reason, which is almost always “the licence looked expensive next to a week of engineering time.”
The Cost Model Nobody Writes Down
The generated code is the cheapest artefact you will produce. Here is the real ledger over three years:
| Cost line | Build | Fork | Buy |
|---|---|---|---|
| Initial construction | Low (agents) | Lowest | Zero |
| Security review | High | Medium | Vendor’s |
| CVE / dependency patching | High | Medium | Vendor’s |
| On-call and incident response | Yours | Yours | Vendor’s (SLA) |
| Compliance evidence | Yours | Yours | Vendor’s report |
| Edge cases and i18n | Yours to discover | Inherited | Vendor’s |
| Maintainer onboarding | Recurring | Recurring | Zero |
| Year-3 rewrite risk | High | Medium | Vendor’s problem |
| Vendor lock-in | None | None | Real |
| Price increases | None | None | Their call |
A vendor amortises the middle rows across thousands of customers. You amortise them across one. That has always been the economic case for SaaS, and no agent changes it.
Option 1: Fork — The Underrated Default
Take a permissively licensed project that solves 80% of the problem and use a coding agent to close the last 20% for your context.
This is usually the best value in 2026, and it is systematically under-chosen because it is less exciting than a green field.
What forking buys you that building does not:
- Inherited edge cases. Years of bug reports from strangers, already fixed.
- Inherited tests. The expensive, boring part of a codebase.
- Inherited security history. Someone already found the obvious injection.
- A migration path back. If upstream ships what you needed, you can rebase and delete your delta.
⚠️ Check the licence before the agent writes a line. MIT, Apache-2.0 and BSD are safe for a private fork. AGPL means your modifications carry obligations if you expose the service over a network. “Source-available” licences (BSL, SSPL and friends) frequently prohibit exactly the commercial use you are planning. This is a five-minute check that has ended six-month projects.
⚠️ Keep your delta small and legible. The failure mode is a fork so divergent you can never pull upstream security fixes. Agents make it very easy to sprawl. Constrain the diff deliberately.
Fork when: a healthy project exists (commits in the last 90 days, more than one maintainer), the licence permits it, and your requirements are a superset rather than a contradiction of what it does.
Option 2: Build — Right for Less Than You Think
Build when the logic is genuinely yours. The strongest build cases share a profile:
- The workflow encodes something specific about how your business operates — pricing rules, an approval chain, a domain model no vendor serves properly.
- The regulatory surface is low. Nobody has to certify it.
- Integration count is small. Each external system you touch is a permanent maintenance contract.
- You have a team that will still own it in three years, and that team knows it.
Build is wrong when you are replacing a vendor whose real product was an obligation: an SLA you can point to during an outage, a SOC 2 report your customers demand, or PCI/HIPAA scope you were happy to have someone else carry.
The test that cuts through most arguments: if the person who builds this leaves in six months, who owns it? If the honest answer is “nobody,” you have not saved money. You have deferred a cost and hidden it.
Option 3: Buy — Still Correct Constantly
Buying is not the lazy default it is currently being framed as. You buy an obligation set, not features:
- An SLA with money attached when it breaks.
- A certification that survives your customer’s security review.
- Liability transfer for a class of failure you cannot absorb.
- Integration maintenance — when the upstream API changes, it is their weekend.
- A roadmap driven by a thousand customers’ edge cases, not just yours.
Buy when the failure mode is existential. Payments, identity, payroll, anything holding regulated data. Building your own auth in 2026 is cheaper than it was in 2020 and still one of the worst decisions available.
The Decision Sequence
Run it in this order — it terminates early most of the time.
- Does a certification or liability transfer matter here? → Buy. Stop.
- Is this a system of record for regulated data? → Buy. Stop.
- Does a healthy, permissively licensed OSS project cover ≥70%? → Fork. Stop.
- Does the logic encode something specific to your business? → Build, if and only if you can name the owner for the next three years.
- Otherwise → Buy, and spend the saved attention on something that differentiates you.
The Three Traps of 2026
Trap 1: Pricing construction against ownership. “Two days of agent time versus $40,000 a year” is not a comparison. “Three years of run cost versus $120,000” is.
Trap 2: The demo that ships itself. An agent produces a convincing prototype in an afternoon, it gets shown to a VP, and now it is a commitment. Prototypes should be explicitly labelled as disposable, and disposing of them should be normal.
Trap 3: Rebuilding the boring 80%. Auth, RBAC, audit logging, exports, notification preferences, rate limiting — every product needs them and none differentiate you. If your build plan includes regenerating that layer, you are burning agent tokens on the exact work forking or buying would have given you free.
The compressed rule for 2026: buy the obligations, fork the commodity, build only the logic that is actually yours.
Last verified: September 8, 2026.