AI agents · OpenClaw · self-hosting · automation

Quick Answer

Build vs Buy vs Fork With AI Coding Agents in 2026

Published:

The Short Answer

There are three options, not two, and in 2026 the middle one is usually right.

OptionWhat you getWhat you oweBest when
BuyCapability plus obligationsA licence feeThe vendor’s SLA, certification or liability transfer is what you actually need
ForkAn 80% solution with historyMaintenance of your deltaA permissive OSS project already exists in the category
BuildExactly your logicThe entire lifecycleThe 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 lineBuildForkBuy
Initial constructionLow (agents)LowestZero
Security reviewHighMediumVendor’s
CVE / dependency patchingHighMediumVendor’s
On-call and incident responseYoursYoursVendor’s (SLA)
Compliance evidenceYoursYoursVendor’s report
Edge cases and i18nYours to discoverInheritedVendor’s
Maintainer onboardingRecurringRecurringZero
Year-3 rewrite riskHighMediumVendor’s problem
Vendor lock-inNoneNoneReal
Price increasesNoneNoneTheir 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.

  1. Does a certification or liability transfer matter here?Buy. Stop.
  2. Is this a system of record for regulated data?Buy. Stop.
  3. Does a healthy, permissively licensed OSS project cover ≥70%?Fork. Stop.
  4. Does the logic encode something specific to your business?Build, if and only if you can name the owner for the next three years.
  5. OtherwiseBuy, 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.

Sources