strata connect sets up a coding agent to use a model running in Strata on your own PC. Start a model with strata launch, then run strata connect claude-code, codex or opencode: it prints the settings, --write saves them (backing up what it replaces), and --check sends one prompt and one tool call to prove it works. Read what it changes before you write it. For Claude Code it edits your global ~/.claude/settings.json, so every project uses the local model until you undo it. For Codex it replaces ~/.codex/config.toml and sets approvals to never. Use at least a 32K context; Claude Code's full prompt alone is about 15.6K tokens. Fair warning, we build a local-first AI coding tool, so we are not neutral.
Our earlier Strata guides covered running Qwen3.8-Flash-Next and DeepSeek V4.1-Flash on a gaming PC. This one is about the next step: getting a terminal coding agent to talk to that local model. Everything below was checked against Strata's docs and source for version 0.2.8, released October 29, 2026.
What does strata connect do?
It writes the config file and environment variables each coding app needs to use your Strata server, with the address, key, model name and context size filled in. It knows eight apps: OpenCode, Codex CLI, Claude Code, oh-my-pi, pi, Hermes Agent, OpenClaw and Strata's built-in DeepSeek Harness. Run strata connect on its own to list them. Each app gets three modes:
strata connect opencode # print the file and environment
strata connect opencode --write # write it after asking; anything replaced is backed up
strata connect opencode --check # send one prompt and one tool call the way that app doesSwap opencode for codex or claude-code. Without flags it reads the settings from the model you launched; otherwise it assumes http://127.0.0.1:8080 and a 32K context. You can override any of it with --url, --key, --model and --context. If you prefer the monitor screen, press 7 for Connect, then c to copy a setup, w to write it or h to check it.
Step 1: install Strata and start a coding model
Strata runs on Windows, Linux and Apple Silicon Macs. NVIDIA cards need driver 580 or newer for its CUDA 13 packages. The install needs no admin rights:
# Linux or macOS
curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh
# Windows (PowerShell), then open a new terminal
irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iexFor coding agents, Strata's model guide offers ISTA-DASLab's Coder build of Qwen3.8-Flash-Next, which keeps 256 of each layer's 512 experts. Its authors report 91% of the full model's SWE-bench Verified score and 99% of its LiveCodeBench score. Its first file is 29.6 GB, so a 32 GB RAM PC can run it if the GPU has enough memory (Strata's launch plan tells you), and it is weaker than the full model outside of code. Start it with room for an agent:
strata launch --family coder --model IQ1_M --context 64kStrata measured this model at about 55 tokens per second in short chat on an RTX 5070 12 GB, and 43 at 128K context. Those are Strata's own numbers on an older engine build, not ours. Skip DeepSeek V4.1-Flash for agent work: its context is fixed at 8K, which an agent's prompt and tools nearly fill on their own.
Step 2: connect your coding agent
Print first, write second, check third. Run strata connect claude-code (or codex, opencode) and read the output. Then add --write, confirm, and finish with --check. The check exits with code 0 only when both the prompt and the tool call work, and --output json gives you the details.
| App | File it writes | How | Prompt and tools |
|---|---|---|---|
| Claude Code | ~/.claude/settings.json | Merges an env block | About 15.6K tokens (20 tools) |
| Codex CLI | ~/.codex/config.toml | Replaces the whole file | About 8.6K tokens |
| OpenCode | ~/.config/opencode/opencode.json | Merges a provider entry | About 7.4K tokens |
Before it writes, Strata copies any existing file to <name>.strata-bak-<date-time> and makes the new file readable only by you, since it can hold the API key. Every config was tested against a Strata server at 32K context. App by app:
- Claude Code talks to Strata's Anthropic-style
/v1/messagesendpoint. The base URL is the server address without/v1; with it, requests go to/v1/v1/messages. No Anthropic login is used. Strata also setsCLAUDE_CODE_MAX_CONTEXT_TOKENSand a 4,096-token output cap, because without them Claude Code assumes a 100K window and compacts at the wrong time. At 40K context or less it addsCLAUDE_CODE_SIMPLE=1, which cuts Claude Code to 3 tools and about 1.25K tokens of prompt. It also turns off Claude Code's telemetry, auto-updater and other non-essential traffic. - Codex CLI uses the Responses API. It will not send anything without
STRATA_API_KEYset; any text works when your server has no key. The message “Model metadata ... not found” on every start is harmless. - OpenCode uses the OpenAI-compatible chat endpoint. It needs
limit.input, which Strata sets just under your context (28,672 at 32K); without it OpenCode never compacts. Its first start downloads a plug-in from npm, so it needs internet once.
What it changes on your machine
These are your apps' real config files, so the change is not limited to one project or one terminal. Three things worth knowing before you press yes:
- Claude Code: every project switches.
~/.claude/settings.jsonis Claude Code's user-wide settings file, so after a write every Claude Code session on that account goes to Strata, not just the one you are testing. If you also use Claude Code with your Anthropic plan, use the printed output instead and set the variables in one terminal only, or keep the backup handy. - Codex: approvals are set to never. The written
config.tomlsetsapproval_policy = "never"withsandbox_mode = "workspace-write", so Codex runs commands without asking, inside its sandbox. Because the file is replaced rather than merged, your other Codex providers and settings are gone until you restore the backup. Where the sandbox cannot start (no bubblewrap on Linux), Strata's own advice is to bypass approvals and the sandbox only in a throwaway folder. We would add: not with a model you have not vetted. Our post on Cohere's Qwen finding is why. - There is no undo command. To go back, rename the
.strata-bak-file over the current one. For Claude Code you can also delete theenvkeys Strata added.
Strata is clear that connected apps are separate programs with their own network behavior, and it does not control what they send. Its engine has no networking code and its server listens on 127.0.0.1, but if you open it to your network with --access lan or a tunnel, keep the API key on: without one, anyone who can reach the port can use the model and its tools.
How much context do you need?
32K is the floor Strata tested; 64K is more comfortable for longer sessions. At 32K, Claude Code's full prompt would take about half the window, which is why Strata switches it to the slimmer 3-tool mode. Codex and OpenCode leave more room. To change the size, restart the model with --context (for example --context 64k --restart) and run strata connect again so the apps pick up the new limit. A bigger window costs memory and speed, so raise it only as far as your sessions need.
Using Strata with Bodega One Code
strata connect does not list our app, and it does not need to. Bodega One Code takes any OpenAI-compatible server through its Custom OpenAI-Compatible provider slot, on top of its 10+ BYOLLM presets. Set the base URL to http://127.0.0.1:8080/v1 (note the /v1 this time), enter any value for the API key unless you set one in Strata, and type the model name Strata reports. Use the Custom slot rather than the llama.cpp preset: that preset also defaults to port 8080 and can try to start its own server.
With the model on your PC and air-gap mode on, Bodega blocks the agent's web tools, network commands, updates and cloud features, and in Ask mode changes wait for your approval. We have not benchmarked Bodega One Code on Strata, and we are not claiming numbers. If you want to keep Claude Code as well, Bodega can run it as an agent inside a chat over ACP (ACP agents are switched off while air-gap mode is on); our Claude Code alternatives page covers how that works and its limits.
Sources
- Strata
strata connectand launch documentation: github.com/Niko1221/Strata/blob/main/docs/TERMINAL_LAUNCH.md - Strata connect config generators (files written, backups, per-app limits): github.com/Niko1221/Strata/blob/main/strata_cli/launch/harness.py
- Strata model guide (Coder IQ1_M sizes and speeds): github.com/Niko1221/Strata/blob/main/docs/MODELS.md
- Strata safety and privacy page: github.com/Niko1221/Strata/blob/main/docs/SAFETY.md
- Strata 0.2.8 release notes, October 29, 2026: github.com/Niko1221/Strata/releases/tag/v0.2.8
- Claude Code LLM gateway docs: code.claude.com/docs/en/llm-gateway
Common questions
- What does strata connect do?
- It sets up a coding app to use a model running in Strata on your PC. strata connect <app> prints the config file and environment with the address, key, model and context filled in, --write saves them after backing up anything it replaces, and --check sends one prompt and one tool call to confirm it works. It supports eight apps, including Claude Code, Codex CLI and OpenCode.
- Can Claude Code use a local model through Strata?
- Yes. Strata serves an Anthropic-style /v1/messages endpoint, and strata connect claude-code sets ANTHROPIC_BASE_URL to the server address without /v1, plus the context and output limits Claude Code needs. No Anthropic login is used. Anthropic does not support routing Claude Code to non-Claude models, so some features may break.
- What files does strata connect change?
- Claude Code: an env block merged into ~/.claude/settings.json, which applies to every project. Codex: ~/.codex/config.toml, replaced in full, with approval_policy set to never and sandbox_mode workspace-write. OpenCode: a provider merged into ~/.config/opencode/opencode.json. Each existing file is copied to <name>.strata-bak-<date-time> first.
- How do I undo strata connect?
- There is no undo command. Rename the .strata-bak- backup over the current file to restore it. For Claude Code you can instead delete the env keys Strata added to ~/.claude/settings.json.
- How much context does a coding agent need on Strata?
- At least 32K, which is the size Strata tested every config at; 64K is more comfortable. Claude Code's full prompt and 20 tools take about 15.6K tokens, Codex about 8.6K and OpenCode about 7.4K. At 40K or less Strata switches Claude Code to a slim 3-tool mode. DeepSeek V4.1-Flash is fixed at 8K, too small for agents.
Written by the Bodega One team. We build Bodega One Code, the local-first AI IDE, and we write here about local models, AI costs, and what we learn shipping it. More about the team and why we build local-first on the about page.
Related posts
Keep learning
Free, vendor-neutral courses and guides in the Bodega One AI Academy, from what a model is to shipping an app.
Stay in the loop
Build-in-public updates, model picks, and Copilot/Cursor news as it breaks.
Follow @BodegaOneAI on X →Ready to own your tools?
Free to use, and the beta is open to everyone. Download free.