add-opencode
Skill31k starsChanged 58 days agoMITView on GitHub
Use OpenCode as an agent provider. OpenRouter, OpenAI, Google, DeepSeek, etc. via OpenCode config — not the Anthropic Agent SDK. Per group via `ncl groups config update --provider opencode`; host passes OPENCODE_* and XDG mount when spawning containers.
- Reads credentials
3 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- prathish-ks/isthmustheir own version, first seen Oct 6, 2026
- TomGranot/groupguardtheir own version, first seen Sep 3, 2026
- microsoft/amplifier-app-nanoclawtheir own version, first seen Jun 12, 2026
Who's talking about nanocoai/nanoclaw
- @github-trending-js.bsky.social“📦 nanocoai / nanoclaw ⭐ 29,631 (+44) 🗒 TypeScript A lightweight alternative to OpenClaw that runs in …”Bluesky · Jun 2, 2026 · 2 likes
- mnemon-dev/mnemon“guide.md and skill.md not written under MNEMON_DATA_DIR — lost on container restart”GitHub · May 29, 2026 · 2 reactions
- socfortress/CoPilot“copilot-talon-improv”GitHub · Sep 2, 2026 · 1 reactions
- @githubfeed.bsky.social“🚀 GitHub Intelligence Drop nanoclaw (TypeScript • 🟢) ⭐ 30.6K → https://github.com/nanocoai/nanoclaw …”Bluesky · Aug 30, 2026 · 1 likes
- @github-trending-js.bsky.social“📦 nanocoai / nanoclaw ⭐ 28,995 (+59) 🗒 TypeScript A lightweight alternative to OpenClaw that runs in …”Bluesky · May 20, 2026 · 1 likes
The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 54
Talked about on GitHub and Bluesky (54 times).
On GitHub · 50
- May 29, 2026guide.md and skill.md not written under MNEMON_DATA_DIR — lost on container restart — mnemon-dev/mnemon2 reactions · 1 comment
- Sep 2, 2026copilot-talon-improv — socfortress/CoPilot1 reaction · 5 comments
- Nov 20, 2026agent-skills.github.nanocoai.nanoclaw: 2026.10.0 → 2026.11.0 — sudosubin/agents.nix0 reactions
- Nov 18, 2026[review mirror] fix(agent-runner): drop queued turns the provider answered inside another turn — drsmk238/nanoclaw0 reactions · 21 comments
- Nov 16, 2026مرشحون جدد للدليل (2026-11-16) — mgrd281/Skill-0 reactions
45 more on GitHub
- Nov 13, 2026OO player rewrites batch 6: sim, hermes, nanoclaw, openclaw, squad, crewai, paperclip, agentrq, crewlet, openswarm — Agent-Analytics/awesome-multi-agent-orchestrators0 reactions · 1 comment
- Nov 1, 2026Script gate for scheduled agents: a cheap check decides whether to wake the brain — Icewater1337/fridolin0 reactions
- Oct 29, 2026fix(telegram): wrap actions with more than 8 buttons into rows of 8 — vercel/chat0 reactions · 1 comment
- Oct 29, 2026Telegram polling: idle getUpdates has no client-side deadline and hangs on a black-holed connection — vercel/chat0 reactions
- Oct 21, 2026docs(gchat): Workspace add-on and webhook verification keys (nanoclaw #4132, #4100) — glifocat/nanoclaw-docs0 reactions · 1 comment
- Oct 16, 2026docs: add NanoClaw to client showcase — agentskills/agentskills0 reactions
- Oct 14, 2026Reposition README: a personable assistant with real memory — bbinoy/ted-personal-assistant0 reactions
- Oct 14, 2026agent-skills.github.nanocoai.nanoclaw: 2.4.0 → 2026.10.0 — sudosubin/agents.nix0 reactions
- Oct 13, 2026M19 stage 4: control-plane simplification decisions (containerized supervisor, embedded store, Hermes pin) — letya999/hermes-hub0 reactions · 2 comments
- Oct 12, 2026Add NanoClaw harness detection — auron-labs/harness-detect0 reactions
- Oct 11, 2026[App Request] NanoClaw — getumbrel/umbrel-apps0 reactions
- Oct 11, 2026Refresh latest contributions and organize profile projects — ogarciarevett/ogarciarevett0 reactions
- Oct 11, 2026docs(promotion): Step 9 — move the pin from v2.4.0 to v2026.10.0 — prathish-ks/isthmus0 reactions
- Oct 10, 2026chore(updates): weekly scan 2026-W41 — tiberiuarva/enterpriseaitools0 reactions · 1 comment
- Oct 4, 2026docs(env): CLAUDE_CODE_AUTO_COMPACT_WINDOW can be set on the host after v2.4.0 — glifocat/nanoclaw-docs0 reactions · 1 comment
- Oct 4, 2026docs(upgrading): setup commits its own files; never stash installed skill files — glifocat/nanoclaw-docs0 reactions · 1 comment
- Oct 4, 2026docs(upgrading): validation refreshes the selected gateway on gateway-skill changes — glifocat/nanoclaw-docs0 reactions · 1 comment
- Oct 3, 2026agent-skills.github.nanocoai.nanoclaw: 2.3.0 → 2.4.0 — sudosubin/agents.nix0 reactions
- Oct 2, 2026fix(e2e): accept NanoClaw setup's own commits after the tested commit — nanocoai/nanoclaw-oss-dev-toolssays it tested it0 reactions
- Oct 1, 2026Dependency advisories still open on v0.52.0 (grpc, x/crypto, otel log, go-archive) — paradigmxyz/iron-proxy0 reactions
- Sep 30, 2026[Candidate] nanocoai/nanoclaw - large collection (63 SKILL.md files) — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 30, 2026agent-skills.github.nanocoai.nanoclaw: init at 2.3.0 — sudosubin/agents.nix0 reactions
- Sep 27, 2026[Plugin]: NanoClaw — omacom/omarchy-plugin-marketplace0 reactions · 11 comments
- Sep 27, 2026docs(promotion): G4 — move the pin from v2.3.0 to v2.4.0 — prathish-ks/isthmus0 reactions
- Sep 13, 2026feat(e2e): supervise provider authentication in the public wizard — nanocoai/nanoclaw-oss-dev-tools0 reactions
- Sep 2, 2026Suggest: nanocoai/nanoclaw — haggaishachar/awesomemap0 reactions · 1 comment
- Aug 31, 2026candidate: add-wechat — BigPengSays/awesome-creator-skills0 reactions
- Aug 30, 2026candidate: add-wechat — BigPengSays/awesome-creator-skills0 reactions
- Aug 29, 2026candidate: add-wechat — BigPengSays/awesome-creator-skills0 reactions
- Aug 25, 2026harvest: world watch — SaneSanders/noemium0 reactions
- Aug 24, 2026Upstream update detected: plan a sandbox refresh (2026-08-24) — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Upstream: chat SDK dependency bump 4.29.0 -> 4.38.1 — nanocoai/nanoclaw#3460 / #3461 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Upstream: send_message double-delivery with mid-turn message blocks — nanocoai/nanoclaw#3462 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Upstream: messages_in UNIQUE-constraint crash on retry — nanocoai/nanoclaw#3457 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Upstream: Discord approval button custom_id corruption — nanocoai/nanoclaw#3185 / #3458 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Upstream: claim-stuck watchdog kills busy (not stuck) turns — nanocoai/nanoclaw#3455 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 23, 2026Track: upstream nanoclaw fixes opened 2026-08-22/23 — DawoudIO/nanoclaw-community-agents0 reactions
- Aug 20, 2026AI Agent Ecosystem Daily 2026-08-21 — huang-yi-dae/agents-radar0 reactions
- Aug 19, 2026fix(pairing): accept spaced approval codes — NousResearch/hermes-agent0 reactions · 1 comment
- Aug 13, 2026Add NanoClaw to compatible clients — agentplugins/agent-plugins-site0 reactions · 2 comments
- Aug 2, 2026chore(sync): update upstream pins for nanoclaw-aio — JSONbored/nanoclaw-aio0 reactions · 1 comment
- Jul 24, 2026🦞 OpenClaw 生态日报 2026-07-24 — zx0828/big_model_radar0 reactions
- Jul 20, 2026🦞 OpenClaw 生态日报 2026-07-20 — 96loveslife/big_model_radar0 reactions
- Jul 19, 2026Add NanoClaw installation instructions to README — Kehillat-Eretz-Hemdah/keh-agent-plugins0 reactions
- Jul 17, 2026[Argus] CVE-2026-56402: NanoClaw 2.1.17 미만 버전 - 검증되지 않은 승인 응답 핸들러를 통한 권한 상승 — LEEKIYOON-SEC/Argus-DEV0 reactions
On Bluesky · 4
- Jun 2, 2026📦 nanocoai / nanoclaw ⭐ 29,631 (+44) 🗒 TypeScript A lightweight alternative to OpenClaw that runs in containers for security. Connects to… — @github-trending-js.bsky.social2 likes and reposts
- Aug 30, 2026🚀 GitHub Intelligence Drop nanoclaw (TypeScript • 🟢) ⭐ 30.6K → https://github.com/nanocoai/nanoclaw heroui (TypeScript • 🟢) ⭐ 30.5K →… — @githubfeed.bsky.social1 likes and repost
- May 20, 2026📦 nanocoai / nanoclaw ⭐ 28,995 (+59) 🗒 TypeScript A lightweight alternative to OpenClaw that runs in containers for security. Connects to… — @github-trending-js.bsky.social1 likes and repost
- Aug 11, 2026My big gripe with a lot of those agent apps is that they basically just promote “go ask AI to configure x”. Like, if NanoClaw install… — @soulfire.jarexibackblaze.org0 likes and reposts · 3 replies
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- microsoft/amplifier-app-nanoclaw★ 4same name
- TomGranot/groupguard★ 4same name
- prathish-ks/isthmus★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- container/CLAUDE.mdCLAUDE.md
- add-anydocSkill
- add-atomic-chat-toolSkill
- add-clidashSkill
- add-codexSkill
- add-dashboardSkill
- add-deltachatSkill
- add-dial-numberSkill
- add-dialSkill
- add-dial-toolSkill
- add-discordSkill
- add-emacsSkill
- add-gchatSkill
- add-githubSkill
- add-imessageSkill
- add-iron-proxySkill
- add-karpathy-llm-wikiSkill
- add-linearSkill
- add-macos-statusbarSkill
- add-matrixSkill
- add-mattermostSkill
- add-mnemonSkill
- add-ollama-providerSkill
- add-ollama-toolSkill
- add-onecliSkill
- add-resendSkill
- add-rtkSkill
- add-signalSkill
- add-slackSkill
- add-tavily-toolSkill
- add-teamsSkill
- add-telegramSkill
- add-vercelSkill
- add-webexSkill
- add-wechatSkill
- add-whatsapp-cloudSkill
- add-whatsappSkill
- customizeSkill
- debugSkill
- init-first-agentSkill
- learnSkill
- manage-channelsSkill
- manage-mountsSkill
- migrate-from-openclawSkill
- migrate-from-v1Skill
- migrate-memorySkill
- migrate-nanoclawSkill
- migrate-slack-agentsSkill
- setupSkill
- slack-a2a-roomsSkill
- slack-agent-flowSkill
- update-nanoclawSkill
- update-skillsSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
After installing this payload, run pnpm exec tsx scripts/opencode-host.ts --configure for host OpenCode setup, or use --update / --debug …
- Very specific: line 69
When refreshing an older installation, remove its unused opencode-memory-plugin.ts, opencode.compaction.test.ts, and dedicated …
- Distinctive: line 159
Run the host build, runner typecheck, host/auth tests, and all provider tests.
- Very specific: line 193
Run pnpm exec tsx setup/index.ts --step provider-auth opencode from the project root to install a missing payload and image, then choose …
- Very specific: line 222
After installing on a running NanoClaw host, restart its actual host service before waking any OpenCode group.
- Distinctive: line 248
If a request fails because the login expired or was revoked, run on the host:
- Very specific: line 274
Run pnpm exec tsx scripts/opencode-models.ts to keep the current default or choose another model without signing in again.
- Very specific: line 286
Only a disposable fixed sentinel is used for that filter.
- Very specific: line 290
If discovery is unavailable, keep the existing model or enter an id manually.
- Distinctive: line 306
Put comments on separate lines.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenCode agent provider
Install OpenCode as an optional NanoClaw runtime. The payload is included in this skill; it needs no separate provider branch. It uses the upstream runtime, instructions, host, and setup metadata contracts. The host contract remains at version 1; the container owns its non-secret ChatGPT placeholder file.
OpenCode is offered by the standard setup provider picker. Existing installs can
add or authenticate it with pnpm exec tsx setup/index.ts --step provider-auth opencode.
To replace an installed payload and update its pins, append --refresh; back up
local payload edits first. Ordinary re-authentication leaves installed files and
the container image alone. Backend defaults are installation-wide; model and
reasoning effort can be overridden per group through the existing container
configuration. Per-group backend/auth selection and structured channel attachment
transport are separate work.
Authentication checks the installed files, registration lines, and exact pins against this skill's declarations without launching a subprocess or container. Install and refresh run the existing provider contract verification; the build step owns image freshness. Model selection does not repeat installation checks. A working backend and account are checked separately by sending a real request.
Install
After installing this payload, run pnpm exec tsx scripts/opencode-host.ts --configure
for host OpenCode setup, or use --update / --debug for the corresponding
operational skill. An existing OpenCode CLI can also run directly in the checkout;
it discovers .claude/skills natively. Host sign-in uses OpenCode's own settings
and is independent of the container's gateway credentials. Installed setup failures
use the existing provider failure-assist hook, including wizard authentication
and installation-check failures. Host diagnostic context is model input and may
remain in native OpenCode history; deleting its private temporary file does not
erase those records. The helper requires stable OpenCode 1.18.25 or newer with
--prompt and prefers the newest compatible installation it finds.
--debug, --update and failure help launch it with an OPENCODE_PERMISSION
override, so OpenCode asks before every edit and command even when the
operator's top-level config allows them (OpenCode itself skips the prompt for
a bare redirection with no command, such as > file). --configure keeps
OpenCode's native permissions.
Automatic help before payload
installation is optional and is not part of the runtime contract.
Install and refresh require host contract version 1 and credential-connection seam version 1. The compatibility predicate below guards every subsequent step, so an unsupported core receives no partial payload or dependency changes. Update core first if it reports a missing prerequisite.
node -e "const fs=require('fs'); const p='src/provider-contracts/registry.ts', g='setup/gateways/credential-store.ts'; if(fs.existsSync(p) && /PROVIDER_HOST_CONTRACT_SEAM_VERSION = 1/.test(fs.readFileSync(p,'utf8')) && fs.existsSync(g) && /PROVIDER_CREDENTIAL_CONNECTION_SEAM_VERSION = 1/.test(fs.readFileSync(g,'utf8'))) console.log('yes'); else console.log('no')"Copy only the files listed below from this skill's payload/ to the matching
paths at the project root. Do not copy ignored dependency directories or other
generated native-test files. These are skill-owned files; overwrite them together
when refreshing the skill. Keep the core-owned cwd-shim.ts, registries, and
contract realization files in place.
When refreshing an older installation, remove its unused
opencode-memory-plugin.ts, opencode.compaction.test.ts, and dedicated
opencode-managed-config tree from container/agent-runner/src/providers/.
Recreate affected containers after the refresh to discard their old config
symlinks. Keep other tools' settings and persisted session data.
The obsolete host Dockerfile guard must also be removed during refresh; current OpenCode installation is declared by the SDK and CLI manifests.
rm -f src/opencode-dockerfile.test.tspayload/container/agent-runner/src/provider-contracts/opencode.ts -> container/agent-runner/src/provider-contracts/opencode.ts
payload/container/agent-runner/src/providers/mcp-to-opencode.test.ts -> container/agent-runner/src/providers/mcp-to-opencode.test.ts
payload/container/agent-runner/src/providers/mcp-to-opencode.ts -> container/agent-runner/src/providers/mcp-to-opencode.ts
payload/container/agent-runner/src/providers/opencode-config.ts -> container/agent-runner/src/providers/opencode-config.ts
payload/container/agent-runner/src/providers/opencode-memory.ts -> container/agent-runner/src/providers/opencode-memory.ts
payload/container/agent-runner/src/providers/opencode-registration.test.ts -> container/agent-runner/src/providers/opencode-registration.test.ts
payload/container/agent-runner/src/providers/opencode-turn.ts -> container/agent-runner/src/providers/opencode-turn.ts
payload/container/agent-runner/src/providers/opencode.attachments.test.ts -> container/agent-runner/src/providers/opencode.attachments.test.ts
payload/container/agent-runner/src/providers/opencode.config.test.ts -> container/agent-runner/src/providers/opencode.config.test.ts
payload/container/agent-runner/src/providers/opencode.conformance.test.ts -> container/agent-runner/src/providers/opencode.conformance.test.ts
payload/container/agent-runner/src/providers/opencode.empty-resume.test.ts -> container/agent-runner/src/providers/opencode.empty-resume.test.ts
payload/container/agent-runner/src/providers/opencode.factory.test.ts -> container/agent-runner/src/providers/opencode.factory.test.ts
payload/container/agent-runner/src/providers/opencode.memory.test.ts -> container/agent-runner/src/providers/opencode.memory.test.ts
payload/container/agent-runner/src/providers/opencode.native.test.ts -> container/agent-runner/src/providers/opencode.native.test.ts
payload/container/agent-runner/src/providers/opencode.question.test.ts -> container/agent-runner/src/providers/opencode.question.test.ts
payload/container/agent-runner/src/providers/opencode.shared-runtime.test.ts -> container/agent-runner/src/providers/opencode.shared-runtime.test.ts
payload/container/agent-runner/src/providers/opencode.sse-cleanup.test.ts -> container/agent-runner/src/providers/opencode.sse-cleanup.test.ts
payload/container/agent-runner/src/providers/opencode.ts -> container/agent-runner/src/providers/opencode.ts
payload/container/agent-runner/src/providers/opencode-auth.ts -> container/agent-runner/src/providers/opencode-auth.ts
payload/container/agent-runner/src/providers/opencode-auth.test.ts -> container/agent-runner/src/providers/opencode-auth.test.ts
payload/scripts/opencode-auth-config.test.ts -> scripts/opencode-auth-config.test.ts
payload/scripts/opencode-auth.test.ts -> scripts/opencode-auth.test.ts
payload/scripts/opencode-auth.ts -> scripts/opencode-auth.ts
payload/scripts/opencode-gateway.test.ts -> scripts/opencode-gateway.test.ts
payload/scripts/opencode-host.ts -> scripts/opencode-host.ts
payload/scripts/opencode-host.test.ts -> scripts/opencode-host.test.ts
payload/scripts/opencode-model-config.ts -> scripts/opencode-model-config.ts
payload/scripts/opencode-models.test.ts -> scripts/opencode-models.test.ts
payload/scripts/opencode-models.ts -> scripts/opencode-models.ts
payload/scripts/opencode-vault.test.ts -> scripts/opencode-vault.test.ts
payload/scripts/opencode-vault.ts -> scripts/opencode-vault.ts
payload/scripts/tsconfig.opencode-auth.json -> scripts/tsconfig.opencode-auth.json
payload/setup/providers/opencode.test.ts -> setup/providers/opencode.test.ts
payload/setup/providers/opencode.ts -> setup/providers/opencode.ts
payload/src/provider-contracts/opencode.ts -> src/provider-contracts/opencode.ts
payload/src/providers/opencode-auth-stub.ts -> src/providers/opencode-auth-stub.ts
payload/src/providers/opencode-registration.test.ts -> src/providers/opencode-registration.test.ts
payload/src/providers/opencode.ts -> src/providers/opencode.tsAppend import './opencode.js'; once to each of the five setup, provider, and contract
barrels below. Keep all existing imports.
import './opencode.js';import './opencode.js';import './opencode.js';import './opencode.js';import './opencode.js';Install the SDK in the runner's Bun package and add the matching CLI manifest entry with trusted postinstall enabled. Both pins must remain exactly 1.18.25. When refreshing an existing install, replace both old pin entries; presence alone does not establish compatibility. This updates the runner package and lockfile; there is no host SDK dependency.
@opencode-ai/sdk@1.18.25{"name":"opencode-ai","version":"1.18.25","onlyBuilt":true}Run the host build, runner typecheck, host/auth tests, and all provider tests. The tests exercise real barrel registration and the provider-owned contract conformance suite. All checks must pass before rebuilding the agent image.
pnpm run buildpnpm exec tsc -p scripts/tsconfig.opencode-auth.jsoncd container/agent-runner && bun run typecheckpnpm exec vitest run src/providers/opencode-registration.test.ts scripts/opencode-auth*.test.ts scripts/opencode-gateway.test.ts scripts/opencode-host.test.ts scripts/opencode-models.test.ts scripts/opencode-vault.test.ts setup/providerscd container/agent-runner && bun test --isolate src/providers/opencode*.test.ts src/providers/mcp-to-opencode.test.tsBuild the local image with ./container/build.sh build. The new SDK dependency
requires a full local build; a CLI-only overlay cannot supply it. This switches
a published-image installation to locally built images.
./container/build.sh buildAuthenticate and select a group
Run pnpm exec tsx setup/index.ts --step provider-auth opencode from the project
root to install a missing payload and image, then choose authentication. If the
provider is already installed, this command leaves its files and image alone;
append --refresh only when intentionally replacing its payload and pins. Choose
ChatGPT sign-in, a local OpenAI-compatible endpoint, OpenRouter, DeepSeek, or a
supported native backend. Automatic API-key configuration supports OpenAI,
OpenRouter, DeepSeek, Google, and Anthropic; other native authentication schemes
require separate integration. The command stores credentials in the configured
credential gateway selected by NANOCLAW_GATEWAY_PROVIDER and backend defaults in
.env. The full setup wizard also offers this flow and selects OpenCode for
new groups only after configuration succeeds. The standalone command leaves the
instance default unchanged.
For ChatGPT, native OpenCode sign-in runs in a temporary container directory.
OpenCode parses its own login file into the seam's chatgpt OAuth profile, hands
it to the selected gateway, and removes the temporary native file. The gateway
stores it in its own native format, and setup may wait for the gateway to confirm
the login works; the gateway's skill describes both. The container initializes fixed
nc-opencode-token-v1 placeholders before every OpenCode server start at
$XDG_DATA_HOME/opencode/auth.json; tokens and account metadata stay in the gateway.
API-key mode clears stale OAuth state. Refresh the payload and restart the host
service and affected containers when updating from the earlier read-only-bind
candidate; old containers retain their mounts until recreated.
Native model domains and the configured HTTPS model host belong to OpenCode’s
provider contract. Your gateway's skill says which endpoints it accepts and
whether a manual grant or a manual re-auth after expiry applies. Do not put a key in
.env, command arguments, or the container environment.
After installing on a running NanoClaw host, restart its actual host service
before waking any OpenCode group. This reloads the host provider registration and
backend settings. On Linux use systemctl --user restart nanoclaw-v2-<install-slug>.service
(or the installation's system service command); on macOS use its normal launchd
restart workflow. Confirm the service is running, then select and restart the
test group:
ncl groups config update --id <group-id> --provider opencode
ncl groups restart --id <group-id>Send a message and verify a reply, then send a second message to check session
continuation. The test requires a reachable backend and the correct gateway
secret grant. No provider is switched by the install steps alone. If memory
needs to move from another provider, follow /migrate-memory before switching.
Recover a ChatGPT login
OAuth refresh belongs to the credential gateway; your gateway's skill says whether re-auth after expiry is manual.
The container uses only a fixed sentinel. Do not implement token refresh in the provider or copy live credentials into a group. A saved credential is not proof that authentication still works.
If a request fails because the login expired or was revoked, run on the host:
pnpm exec tsx scripts/opencode-auth.ts --reauth
# For a browser on the host instead of device pairing:
pnpm exec tsx scripts/opencode-auth.ts --reauth --method browserThis pairs again and updates the existing gateway credential ID, preserving its grants and all backend/model defaults. If no credential exists, setup creates one and applies the gateway’s grant behavior described above. Retry the failed request.
An unavailable vault, duplicate name, or incompatible credential entry stops the operation before sign-in. Resolve the gateway/permissions or entry metadata in the selected gateway and retry; do not delete a credential to force setup to run. Failed pairing leaves the old entry intact; failed saves leave defaults unchanged. Temporary native credentials are removed after either success or failure.
API-key rotation keeps the same credential ID. Changing its exact host requires confirmation; whether the stored key can move with it is the gateway's decision, and a blank answer keeps a key only where the gateway allows. Setup never retrieves the stored key.
Change or refresh the default model
Run pnpm exec tsx scripts/opencode-models.ts to keep the current default or
choose another model without signing in again. This changes only
OPENCODE_MODEL; the small model, endpoint, credentials, and group overrides
stay as configured. Restart the NanoClaw host and affected groups afterward.
pnpm exec tsx scripts/opencode-models.ts --list --refresh
pnpm exec tsx scripts/opencode-models.ts --model openai/<model-id>Discovery runs the installed container's opencode models command and filters
for text and tool support, including its ChatGPT-specific filter when selected.
Only a disposable fixed sentinel is used for that filter; no credentials or host
OpenCode files are mounted for discovery. --refresh fetches the runtime's
current model catalog; it does not upgrade the CLI or SDK. Account access is checked by a real
request, not by catalog membership. Standalone host OpenCode is never consulted.
If discovery is unavailable, keep the existing model or enter an id manually.
There is no static fallback list. A custom OpenAI-compatible endpoint is queried
through its own /models endpoint; other custom endpoints use manual IDs.
The configured backend must match the model prefix; changing backends still
uses the authentication command. Exported defaults take precedence over .env,
so conflicting exported values must be cleared before changing the saved model.
This separate command avoids rerunning authentication merely to change a model, and querying the container avoids disagreement with a separately upgraded host CLI. New models needing newer runtime support require a matched CLI/SDK update and image rebuild. Model changes do not automatically change context limits or modalities; adjust any custom overrides to match the new model.
Backend defaults
The host reads these values from exported environment variables, then .env.
Put comments on separate lines. These settings affect only OpenCode containers.
OPENCODE_PROVIDER: OpenCode backend ID, such asopenaioropenrouter.OPENCODE_MODEL: default fullprovider/modelID. The group's model wins.OPENCODE_SMALL_MODEL: optional separate model for lighter work, using the same backend prefix asOPENCODE_PROVIDER.OPENCODE_BASE_URL: backend URL, ornativeto use the native endpoint. For anopenaibackend with a custom URL, the runtime uses Chat Completions. An absent setting retains the historicalANTHROPIC_BASE_URLfallback for existing installs. The auth command writes this provider-owned setting and preserves Claude's endpoint.OPENCODE_AUTH_MODE=chatgpt: initialize the container's non-secret ChatGPT stub. Leave unset for API-key and local endpoints; the auth command handles this when switching.OPENCODE_MODEL_CONTEXT_LIMIT: positive token count for the main model.OPENCODE_MODEL_OUTPUT_LIMIT: positive output limit, requiring a context limit.OPENCODE_MODEL_INPUT_MODALITIES: optional comma-separated main-model input types fromtext,audio,image,video,pdf.OPENCODE_NATIVE_ATTACHMENT_MAX_COUNT/OPENCODE_NATIVE_ATTACHMENT_MAX_BYTES: optional limits for already-staged structured attachments. Upstream channel attachment transport remains text-only until that separate feature lands.
Custom model limits and modalities apply only to the main model. NanoClaw supplies MCP configuration and container policy. See ARCHITECTURE.md for turn completion, memory snapshots, offline startup, cancellation, and MCP timeouts.
For reproducible native integration coverage, download the official OpenCode
1.18.25 binary and run from container/agent-runner:
OPENCODE_TEST_BINARY=/absolute/path/opencode bun test --isolate src/providers/opencode.native.test.tsThe test checks the binary version, starts a local model fixture, and exercises
native tools, automatic and overflow compaction, cold resume, child memory,
terminal errors, a 65-second MCP call, and cancellation. It writes its requests
and server logs to the temporary evidence directory printed at completion.
It takes about two minutes and requires no account credentials. The ordinary
test suite skips this check unless OPENCODE_TEST_BINARY is set.
To remove the provider, follow REMOVE.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

