Self-hosted Claude Code: where an open-source harness draws the line
Self-hosted Claude Code in 2026 means Anthropic's public beta runs cloud sessions on a runner inside your network, not on your laptop. The control plane, the queue and the transcript stay with Anthropic. Kortix is the open-source CompanyOS that puts the harness, the repo and the review on your side, and it is my pick; I work at Kortix, so weigh that accordingly.
Self-hosted Claude Code against an open-source harness
The same four layers, split in different places.
Open source
YesYesKortix- Anthropic self-hosted Claude CodeNoNo
What runs on your hardware
The platform stack; each session's sandbox stays managed computeKortix- Anthropic self-hosted Claude CodeThe runner and the Claude Code processes it starts
Where the control plane lives
In your instance, on your serverKortix- Anthropic self-hosted Claude CodeAnthropic's infrastructure: orchestration, queueing, the claude.ai interface
Where session content goes
Your instance, sandbox provider and model providerKortix- Anthropic self-hosted Claude Codeapi.anthropic.com; Anthropic stores the transcript
Model choice
Any model provider with your own keysKortix- Anthropic self-hosted Claude CodeAnthropic API, Amazon Bedrock or Google Cloud
Who reviews a change
A person merges; merge is default-deny for agentsKortix- Anthropic self-hosted Claude CodeYour git host's rules; the runner pushes commits
Plan needed
Self-host is freeKortix- Anthropic self-hosted Claude CodeTeam or Enterprise; an Owner enables the beta
The manifest that defines a project
sandbox:default: pythontemplates:- slug: pythonname: Python 3.12image: python:3.12-slimcpu: 2memory: 4The sandbox block from the reference manifest: a default template, one named image and its hardware, written as lines in the repo.
Anthropic's beta moves the runner, not the control plane
Anthropic's self-hosted environments are in public beta on Team and Enterprise and off by default; an Owner turns them on in the Cloud environments admin page (the documentation, checked October 2026). Three pieces make the feature. An environment is a named destination in claude.ai admin settings. A runner is a program on a host inside your network. A session is one Claude Code task a developer starts.
When a developer picks your environment, Anthropic's control plane places the session on its queue. A runner claims it, clones the repository the developer chose, and starts a Claude Code process on your host. Traffic back to Anthropic runs over outbound HTTPS: queue polling, the session's event stream, and by default model inference. Anthropic never connects into your network.
The runner executes work on your hardware. The queue, the orchestration and the claude.ai interface remain Anthropic-hosted. Repository checkouts, build artifacts, secrets and the files a session creates stay on your machines. The session's content, including prompts, responses and tool results, goes to api.anthropic.com, and Anthropic stores the transcript so the session can resume elsewhere. Model inference uses the Anthropic API unless you configure a runner for Amazon Bedrock or Google Cloud. The transcript goes to Anthropic either way.
Two exclusions narrow the field. The beta is unavailable to organizations with Zero Data Retention enabled or the HIPAA configuration applied. And someone has to build and maintain the runner image, operate the fleet and control its network. Anthropic's own guidance says most teams are better served by its hosted environments.
The runner image is yours; the queue is not
For a team whose blocker is network reach, the runner image is a real win. Pre-install compilers, SDKs and internal CLIs in the runner image, and every session starts ready to build. Sessions can reach internal services, databases and registries without exposing them to the public internet. A compliance team gets repository checkouts and build artifacts on infrastructure the company controls.
Then look at what the image cannot change. The session still arrives through Anthropic's queue. The transcript still lands on Anthropic's side. The model still comes from Anthropic unless a cloud account takes over inference. The runner is durable work, and it is also a client of a hosted control plane. A team that reads "self-hosted" as "the system is ours" will overestimate what the beta delivers.
The beta fits a specific buyer: an enterprise already on Claude, with cloud sessions in use, whose security review asks where code executes rather than where orchestration lives. That buyer gets network access and a fleet to run. Anthropic stays in the path.
What open source changes
Kortix takes the other end of the split. The repo is the unit of ownership. Open source. Read it, fork it, audit it.
A project is a git repo with kortix.yaml at its root, and the manifest holds the pieces that decide how sessions run: sandbox templates, tool lists, agent grants and triggers (Read the docs). The block holds behavior and grants; the markdown file holds the prompt. Change a grant and the change is a diff someone can review.
Sessions do not run on the box that hosts the stack. The self-host README says: "Agent sessions still run on Platinum, a cloud sandbox provider set with PLATINUM_API_KEY." It adds that sandboxes are "managed compute, not part of this box". The README puts the split in its opening paragraph and names Platinum as the provider the sessions run on (checked 1 November 2026). What stays on your disks is the stack and the instance directory: the database, the stored files and the secrets. What stays in your git is the configuration that defines the fleet. Power-cycle the host and the stack returns from the instance directory; the agents return from the repo.
The harness is where model choice lives. Sessions run on pi, and a project can point at a custom OpenAI-compatible endpoint: open the Custom tab, enter a provider id, a name, the base URL and one or more models, and Kortix stores the endpoint in the project (Read the docs, checked October 2026). A model id is <id>/<model>, and both harnesses can use its models. Any model provider with your own keys. A self-hosted instance has no managed models, so each project connects its own provider.
That combination changes the question a buyer asks. With Anthropic's beta, the question is which parts of a hosted system can execute in your network. With an open-source harness, it is which files define the system and who may change them. The second question survives a repricing or a product rename, because the answer is a repo you can clone.
The review gate a runner does not give you
Anthropic's documentation describes the runner's job and stops at the git host. The runner clones and pushes with credentials you configure. What happens between a pushed branch and a merged default branch is your git host's policy, and the review belongs to the team's workflow.
Kortix makes that boundary part of the product. Session work reaches main through a change request. Merge is default-deny for agents. The agent commits on its session branch, opens the change request and stops. A person reads the diff. An agent can merge only when its grant includes project.gitops.merge; the starter agent has that grant, and a scoped specialist without it waits for a person.
The gate matters more once configuration lives in the repo. A new skill, a widened connector grant and a changed trigger all arrive as diffs. The same review that catches a bad function catches a permission change.
A decision guide for the first quarter
Pick Anthropic's self-hosted environments when the hard requirement is execution inside your network and the rest of the stack can stay with Anthropic. The beta suits an organization on the Team or Enterprise plan that already runs cloud sessions, has people ready to operate a runner fleet, and accepts that the transcript and model calls go to Anthropic. It is the shorter path when the alternative is moving the whole system.
Pick an open-source harness when ownership has to include the configuration, the model route and the review gate, not only the machine that executes. Kortix covers that case. Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free. A team that wants the repo on its own disk and sessions on Platinum can have both.
Change nothing when the team only uses Claude Code in a terminal or an IDE. Those sessions already run on the developer's machine, and Anthropic's documentation says there is nothing to configure. A server-side beta adds work only when cloud sessions are part of how the team works.
The mistake to avoid is treating self-hosting as one decision. It is four: where the runner executes, where the control plane lives, where the session content goes, and which files define the system. Anthropic's beta settles the first and keeps the other three. Kortix moves the control plane and the configuration to the team's side, and is candid that sessions still run on Platinum, managed compute off the box.
Questions the search box asks
What the beta runs, where the queue sits, and who keeps the transcript.
Can Claude Code be self-hosted?
Partly. Anthropic's self-hosted environments, in public beta on Team and Enterprise, run cloud sessions on a runner inside your network while the control plane and transcript stay with Anthropic.
Can Claude Code use self-hosted models?
Not locally. A runner can send model requests to Amazon Bedrock or Google Cloud, and the session transcript still goes to api.anthropic.com.
Can I run Claude Code locally for free?
Yes. In a terminal or IDE, Claude Code runs on the developer's own machine at no hosting cost. The self-hosted beta is for cloud sessions a team dispatches to its own network, and it needs a Team or Enterprise plan.
opensourceclaudecowork.com
© 2026
Run the system you own
The repo, the harness and the review stay on your side.