OpenCode

OpenCode in Sikemux: install, sign-in with a provider, chats and skills.

Edit on GitHub

OpenCode is an open-source coding agent that works with many model providers.

At a glance

Commandopencode
Chat in SikemuxYes, and its own TUI
Permission modesNormal and YOLO, plus Build and Plan, chat only
Effort levelsEach model’s own, chat only
Several accountsNo

Install

curl -fsSL https://opencode.ai/install | bash

It installs to ~/.opencode/bin/opencode and updates itself.

Sign in

OpenCode signs in per model provider:

opencode auth login

Sikemux reads OpenCode as signed in when OpenCode keeps a credential, including one you signed in with in OpenCode 2, or when your shell sets an API key for one of its providers.

Free models

With neither, OpenCode still runs the free models its own service offers, with no account, and Sikemux shows it as Ready · free models. OpenCode picks the model; the chat’s model menu lists the others. They are free for a limited time and change often, and some of their providers keep your prompts to improve the model; OpenCode’s model list says which. When one fails, the chat says so and suggests another model or a signed-in agent. Set OPENCODE_DISABLE_FREE_MODELS=1 in your shell to turn them off, and Sikemux then shows OpenCode as signed out.

How Sikemux runs it

A chat runs its own opencode serve, OpenCode’s HTTP server, on a port and password only that chat knows, and follows the server’s events as OpenCode works.

The chat’s permission mode builds on the rules OpenCode already has for the agent it runs, your own config’s rules and your per-agent rules included. Normal asks before commands and file edits, unless your rules allow them; reads, searches and other tools go through. YOLO asks about nothing, not even reading a .env file, but whatever your rules deny, such as git push, stays denied.

The mode menu also lists OpenCode’s own agents, Build and Plan, and the chip reads PLAN while Plan is on. Plan never edits outside its plan folder, even in YOLO.

Edit on a message you sent reverts the session to before it, which also puts back the files the turns after it changed. Deleting an OpenCode chat removes its session through OpenCode’s own server.

Before a new chat starts, its model and effort menus list what OpenCode offers, read from a short-lived server. Each model has its own efforts, such as low to max on Claude Opus, and Default leaves it to the provider. The effort you pick is kept for your next OpenCode chat on a model that has it.

On a model provider, Sikemux adds that provider to the inline config it gives the chat, reached through Sikemux so the key stays out of the agent, and your own OpenCode config stays untouched. A chat started with --model sikemux-<provider>/<model> runs on that provider. A reasoning model there offers low, medium and high, and OpenCode knows its context window, so the chat shows how full it is.

Chats turn on OpenCode’s todo list, which shows as the chat’s plan. Each subagent OpenCode starts gets a card in the chat with what it says and how many tokens it has used, and the card stays live after the turn that started it ends, since OpenCode runs subagents in the background. A question OpenCode asks goes to your inbox like any agent’s, and /compact shows its progress in the chat. The chat list, search and renaming read the sessions OpenCode 2 keeps.

Skills

Sikemux adds its skills library to OpenCode’s skill paths for each chat, alongside the paths you configured.