OpenCode

Running the OpenCode CLI inside Open Free Max — model selection in provider/model form, agent profiles, the embedded server port, and how permissions are driven by environment rather than flags.

OpenCode runs as a normal interactive session in Open Free Max, with a smaller integration surface than Claude Code or Codex because the CLI exposes fewer command-line hooks.

What OFM does with it

  • Continue the last conversation. opencode --continue reopens the most recent session for the folder. There is no resume-by-id, so a tab restores the latest conversation rather than a specific one.
  • No MCP injection. OpenCode offers no way to declare an MCP server at launch without editing your own configuration, so MCP servers, the memory tool and the Obsidian vault are not wired into OpenCode sessions.
  • Estimated accounting. Token counts in the Consumption view are estimated from the transcript.

Launch flags

Setting Effect
Model provider/model form, e.g. anthropic/claude-sonnet-4-6. Empty = config default
Agent Main agent launched at startup, e.g. build, plan
Port Port of the embedded local server. Empty = automatic
Auto-approve everything Sets OPENCODE_PERMISSION={"*":"allow"} — every action is approved
Additional arguments, Environment variables Escape hatches

Permissions live in the environment

OpenCode drives permissions through configuration and environment variables, not through a TUI flag. That is why the auto-approve option is implemented as an environment variable rather than an argument — and why it is marked dangerous: with {"*":"allow"} the agent never asks, so Mission Control has no confirmation to intercept, queue or audit.

If you want unattended runs with a safety net, prefer a CLI where the agent still announces its actions and let the rules engine answer them.

A note on billing

OpenCode can be pointed at many providers, and some of those paths are API-key based. Open Free Max’s rule is that agents run on a subscription, not a metered API — see Subscription vs API. Routing Claude through OpenCode is not a way to use a Claude subscription; it requires an API key and bills per token. Use Claude Code for that.

Installation

Install the OpenCode CLI with the assistant in the agent tab, then re-check so the new binary is found on your PATH.

Frequently asked

How does OFM auto-approve actions in OpenCode?
OpenCode has no TUI permission flag, so OFM sets OPENCODE_PERMISSION={"*":"allow"} in the session environment when you enable the dangerous auto-approve option.
Can OpenCode use my Claude subscription?
No. Routing Claude through OpenCode requires an API key, which is metered billing — exactly what Open Free Max is built to avoid. Use the Claude Code CLI for subscription-based Claude access.

Last updated