Why runtime lock-in is the new vendor lock-in

Most teams building agentic coding tools start with a single runtime: Claude Code, Codex, or a homegrown loop. It works, until the model provider changes pricing, a new runtime ships better file/shell tools, or your users demand a specific agent. Rewriting your orchestration layer every time the ecosystem shifts is expensive and boring work.

The AI SDK Harness takes a different bet: treat the runtime as a pluggable adapter. You write to one HarnessAgent interface, and the harness handles the runtime-specific plumbing — sessions, tool approvals, streaming, attach/resume. Today two new adapters join the lineup: Deep Agents and OpenCode, both running inside a Vercel Sandbox.

For teams already tracking where the web stack is heading, this is a good example of the broader trend toward composable agent infrastructure — the same shift I covered in Beyond the Framework Hype: Key Takeaways from a 2025 Dev Summit.

Developer switching between AI coding agent runtimes via unified AI SDK Harness interface on laptop Dev Environment Setup

The two new adapters

Deep Agents (@ai-sdk/harness-deepagents)

This adapter wraps LangChain's deepagents runtime. That means you inherit file and shell tools, skills, host tools, multi-turn sessions, attach/resume, and built-in tool approvals — all exposed through the harness contract.

// Deep Agents adapter: wraps LangChain's deepagents runtime
import { HarnessAgent } from '@ai-sdk/harness/agent';
import { deepAgents } from '@ai-sdk/harness-deepagents';

const agent = new HarnessAgent({
  harness: deepAgents,
});

OpenCode (@ai-sdk/harness-opencode)

This one is more interesting architecturally: it boots a real OpenCode server inside the sandbox via @opencode-ai/sdk and streams its session events through the harness. You get OpenCode's built-in tools, support for both built-in and host tool approvals, and the ability to pick the model, provider, and reasoning variant.

// OpenCode adapter: boots a real OpenCode server inside the sandbox
import { HarnessAgent } from '@ai-sdk/harness/agent';
import { openCode } from '@ai-sdk/harness-opencode';

const agent = new HarnessAgent({
  harness: openCode,
});

The full supported list is now: Claude Code, Codex, Deep Agents, OpenCode, Pi — with more on the way.

Vercel Sandbox running OpenCode server streaming session events to a harness adapter Algorithm Concept Visual

What this actually buys you (and what it doesn't)

DimensionWithout HarnessWith Harness
Runtime swapRewrite orchestration layerChange one import
Tool approval UXRuntime-specificUnified contract
Session streamingCustom per runtimeNormalized events
Sandbox lifecycleYou manage itHandled by Vercel Sandbox
DebuggingRuntime-specific logsStill runtime-specific (leak)
Cost modelDepends on providerDepends on provider (no change)

The honest caveats:

  • The abstraction is not free. Each adapter exposes different tool surfaces. If your app depends on a Deep Agents-specific skill, you're still coupled to Deep Agents — the harness just hides the wiring, not the semantics.
  • Sandbox assumption. These adapters run inside a Vercel Sandbox. That's a real constraint if your infra is on AWS or GCP and you can't move the execution boundary.
  • Streaming event schemas differ. "Normalized" doesn't mean identical. Expect to handle runtime-specific event shapes at the edges.
  • Approval models diverge. Built-in vs. host tool approvals are supported across both, but the UX you build around them will still need runtime-aware branches.

This is the same pattern playing out across supply-chain tech, by the way — see how tokenized cotton traceability is being built on similar composable primitives in How Blockchain is Revolutionizing Agricultural Traceability.

Cloud architecture diagram of AI SDK Harness adapters for Deep Agents and OpenCode runtimes Development Concept Image

Should you adopt it?

If you're building an agent product and you've already felt the pain of a runtime swap, the Harness is worth a serious look. The value isn't in any single adapter — it's in the option to swap without a rewrite.

Next steps to actually learn this:

  1. Read the Deep Agents harness docs and the OpenCode harness docs end-to-end before writing code.
  2. Build a throwaway agent that does one thing (e.g., read a file, run a shell command) against two harnesses. The friction you feel is the real cost of abstraction.
  3. Instrument your tool-approval flow early. It's the part that most often breaks when you swap runtimes.
  4. Watch the harness list for new adapters — the abstraction only pays off if the ecosystem keeps growing.

Sources & further reading: Vercel changelog — Deep Agents and OpenCode harness adapters.

This content was drafted using AI tools based on reliable sources, and has been reviewed by our editorial team before publication. It is not intended to replace professional advice.