crabcode

OpenCode Compatibility

What OpenCode configuration works in crabcode and what is crabcode-specific.

Treat it like OpenCode

Don't think CrabCode as another agent config to manage, just treat it like configuring OpenCode.

Most OpenCode docs apply directly: config is JSON/JSONC, project assets live under .opencode/, and command files use the OpenCode markdown command format. crabcode adds a small terminal-specific layer for notifications and theme selection.

Compatibility map

Blank cells mean that runtime behavior is not supported by that project today. ❌ means crabcode intentionally ignores the OpenCode setting.

Area / settingOpenCodecrabcodeNotes
model✅✅Default model when no persisted active model is set.
small_model / smallModel✅✅Not enabled by default. When configured, crabcode uses it for lightweight tasks such as session title generation.
default_agent✅✅Selects the startup agent mode.
command config✅✅JSON-defined slash commands with template, description, agent, model, and subtask.
.opencode/commands/*.md✅✅Markdown command files, including nested names.
.crabcode/commands/*.md✅crabcode-specific command overrides.
$ARGUMENTS, $1, $2✅✅The final positional placeholder consumes the rest of the arguments.
!`command` in command files✅✅Runs from the project root and injects command output.
@path file references in commands✅✅File or directory content is appended to the rendered prompt.
AGENTS.md project instructions✅✅crabcode walks up from the working directory and prefers AGENTS.md over CLAUDE.md in the same directory.
~/.config/crabcode/AGENTS.md✅crabcode global instructions.
Claude Code fallback rules✅✅CLAUDE.md and ~/.claude/CLAUDE.md are read unless disabled by crabcode environment flags.
Skills✅✅Reads SKILL.md files from OpenCode, crabcode, Claude, and .agents skill roots.
agent.<name>.tools✅✅Tool allowlists feed the runtime agent registry.
agent.<name>.permission✅✅Agent-specific permission rules override global rules.
agent.<name>.task_permissions✅✅Controls which subagents an agent may invoke through Task.
agent.<name>.steps / maxSteps / max_steps✅✅Registry max-step values apply to primary agents and subagents.
agent.<name>.mode / hidden✅✅Modes control primary/subagent use; hidden agents are omitted from prompt and autocomplete listings.
agent.<name>.model / temperature / top_p✅partialSubagent model overrides are applied for Task/@agent; sampling settings are parsed but not yet applied.
Markdown agent files✅✅.opencode/agents/*.md frontmatter is parsed; body content becomes agent instructions.
provider.<id>.options.timeout✅partialInteger milliseconds or false to disable timeout.
theme✅✅In crabcode config files only. OpenCode config theme is ignored by crabcode.
notifications✅crabcode-specific sounds, desktop notifications, and terminal alert signals such as Zed tab dots.
images✅crabcode-specific image placeholder opener.
editor✅crabcode-specific shell template for clicked file paths. See Editor.
mcp✅✅Uses the OpenCode MCP config shape. Enabled servers are connected at runtime and their tools are exposed as crabcode tools.
permission✅✅Global tool permission rules are enforced during AI SDK tool execution.
instructions✅✅Loads the listed files relative to the project root (or from absolute and ~/ paths) and appends their contents to the system prompt. Unreadable files produce a config warning.
tools✅✅Global tool enable/disable map. Disabled tools are removed before agent-specific tool policies are applied.
compaction✅✅Applies auto and reserved to persisted TUI/ACP sessions; prune also applies to print and subagent requests. Manual /compact remains available when auto-compaction is disabled.
watcher✅✅Controls file suggestions in command autocomplete. Use false to disable them or { "ignore": ["path"] } to exclude paths.
formatter✅Accepted and parsed by file extension, but configured formatter commands are not run yet.
disabled_providers✅✅Removes the listed provider IDs from model discovery and selection.
enabled_providers✅✅Restricts model discovery and selection to the listed provider IDs. disabled_providers takes precedence when both are set.
keybinds✅❌Ignored because crabcode does not use OpenCode keybind config.
share✅❌Ignored.
tui✅❌Ignored. crabcode owns its terminal UI.
server✅❌Ignored.
plugin✅❌Ignored.
custom tools (tool, custom_tools, customTools)✅❌Ignored.

MCP notes

Use the OpenCode MCP docs for the config shape. crabcode reads the same top-level mcp map from OpenCode and crabcode config files, supports local stdio servers and remote HTTP servers, and registers discovered MCP tools into the normal tool list. Only enabled servers are exposed to the model; the /mcp toggle (and enabled: false in config) drops those schemas from the next request.

MCP OAuth works like OpenCode (crabcode mcp auth <name>, or a in /mcp). Tokens are stored in ~/.local/state/crabcode/mcp-auth.json.

MCP server enabled flags are respected. The remote UI can toggle configured servers, and those overrides are persisted in crabcode preferences. MCP resources are not exposed as separate resource-list/read tools yet; tool calls are supported.

Use the OpenCode docs