Coding agents (Claude Code / OpenCode)
Waired points the coding agents you already use at your own model. There are two pieces:
waired linksets up the per-user integration files — Claude Code skills (~/.claude/skills/) and the OpenCode provider plugin (~/.config/opencode/plugin/waired.js) — and issues the gateway token they use.- Managed settings point Claude Code at your local model by writing Claude
Code’s system-wide
managed-settings.json, so you don’t set any environment variable or shell alias.
Claude Code
Section titled “Claude Code”Claude Code is routed through managed settings: Waired writes Claude Code’s
system-wide managed-settings.json so that Claude Code talks to your local
model. No credential is written there, so Claude Code keeps using your existing
claude.ai subscription — including subscription auto-mode (opusplan / Max
Opus→Sonnet usage fallback). There are no certificates, no /etc/hosts
edits, and no shell changes. This works the same on Linux, macOS, and Windows.
waired init enables this for you by default; you can also manage it directly.
-
Set up the integration files and gateway token:
Terminal window waired link claude-code -
Make sure managed settings are enabled (
waired initusually did this already):Terminal window sudo waired claude enableTerminal window # run elevated:waired claude enableThe installer’s “Route Claude Code through Waired” task does this for you by default.
-
Just start Claude Code — no
ANTHROPIC_BASE_URLand no alias needed:Terminal window claude
Switch where requests go, mid-session
Section titled “Switch where requests go, mid-session”You don’t have to restart Claude Code to change where your requests are served.
Enabling the integration installs a /waired-route slash command — run it
inside Claude Code and the next request honours the change:
/waired-route anthropic— use the real Anthropic API (handy if the local model is misbehaving on a task)./waired-route local— force your local model; never contact Anthropic. (Your active local model answers, whatever model the session has selected.)/waired-route auto— back to the default (local when healthy, with the automatic fallback above).
The same switch is available from a terminal:
waired claude route anthropic # or: local | autowaired claude route # show the current modeSee where requests go, in Claude Code
Section titled “See where requests go, in Claude Code”So you never have to wonder whether Waired is active, enabling the integration also adds two things you see inside Claude Code:
-
A status line segment in the footer showing the current route — e.g.
⚡ waired: local (qwen3-8b-instruct)(served by your local model, with the model that answered the last request),→ waired: Anthropic(using the real API), or✕ waired: agent down. If you don’t already have a custom status line, Waired adds this for you; if you do,waired initandwaired claude enableask before touching it (or runwaired claude statusline install --wrapyourself). It disappears cleanly if Waired is later removed.One caveat: Claude Code uses only the highest-precedence status line, and a project’s
.claude/settings.local.json/.claude/settings.jsonoutranks the user-level one Waired installs. Waired never edits project files — runwaired claude statusinside the project and it reports the shadowing along with a one-liner you can paste into your own status-line script to show the route there. -
A one-line notice after any turn that fell back to the real Anthropic API, so a request that couldn’t be served locally is never silently redirected.
Both are removed by waired claude disable. To skip the status line at enable
time, pass --no-statusline.
OpenCode
Section titled “OpenCode”OpenCode is configured by the same waired link step, which installs the
provider plugin at ~/.config/opencode/plugin/waired.js. The plugin points
OpenCode at your Local Gateway and forwards the gateway token for you.
waired link opencodeRun waired link with no agent name to set up every installed agent at once.
Verify and remove
Section titled “Verify and remove”Check that routing is active:
waired claude statusIt reports whether managed settings are enabled and where the
managed-settings.json file lives:
- Linux:
/etc/claude-code/managed-settings.json - macOS:
/Library/Application Support/ClaudeCode/managed-settings.json - Windows:
C:\Program Files\ClaudeCode\managed-settings.json
The tray’s Claude integration menu shows the same status.
To remove the integration (surgical — it only undoes what link added):
waired unlink # remove all agentswaired unlink claude-code # remove just oneTo stop routing Claude Code through Waired (reverts the managed-settings change, restoring Claude Code’s default behavior):
sudo waired claude disable # Windows: run elevated, no sudoIf a coding agent isn’t using your model, run waired doctor —
it checks the gateway token, paused state, engine readiness, mesh peer, and the
integration in one pass, and can repair what’s fixable.