OpenCode
Install, authenticate, and resume OpenCode inside Daintree, including its inline --mini launch and the resume-latest fallback.
OpenCode
OpenCode is a provider-agnostic, open-source CLI coding agent. It runs as a process in its own Daintree terminal panel with full PTY emulation, like every other built-in agent.
| Command | opencode |
|---|---|
| Shortcut | None by default; assign one in Keyboard Shortcuts |
| Color | Emerald (#10b981) |
| Default rendering | Inline, via --mini |
| Permission bypass | None declared by Daintree |
| Resume | opencode -s <session-id>, falling back to opencode --continue |
| Platforms | macOS, Windows, Linux |
Install & Authenticate
opencode command with OpenCode 2. V2 uses a separate installer and package and cannot sit beside V1 under the default command name. Daintree still passes --mini; current V2 documents opencode mini instead. If your installed version rejects that flag, select Use alt-screen mode for OpenCode to stop Daintree adding it. Check the installed CLI's help before changing generations; Daintree's automatic MCP and resume integration has not been verified against V2 here.curl -fsSL https://opencode.ai/install | bash Or npm install -g opencode-ai, or brew install anomalyco/tap/opencode (OpenCode's own tap, which it recommends over the core brew install opencode formula for the newest releases).
npm install -g opencode-ai OpenCode recommends WSL on Windows. Native options also include Scoop (scoop install opencode), Chocolatey (choco install opencode), and mise (mise use -g github:anomalyco/opencode). Daintree's in-app install prompt shows the Scoop route as scoop bucket add extras then scoop install extras/opencode.
curl -fsSL https://opencode.ai/install | bash Or npm install -g opencode-ai, brew install anomalyco/tap/opencode, or on Arch sudo pacman -S opencode (stable) or paru -S opencode-bin (latest).
Run opencode and use /connect inside the session to add a provider (Anthropic, OpenAI, OpenRouter, and the rest of the Models.dev list); opencode auth login does the same from a shell and stores keys in ~/.local/share/opencode/auth.json. Daintree reads that file and ~/.config/opencode/opencode.json to decide whether the agent shows as ready. Because OpenCode is provider-agnostic, any of ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_API_KEY also counts.
The curl installer drops the binary in ~/.opencode/bin or ~/.local/bin. Daintree probes both, so a script install is detected even when the Electron process inherits a PATH that misses them.
How Daintree Launches It
OpenCode is one of the three agents that launch inline by default, but it gets there differently from Codex and Grok. Daintree leaves its full-screen renderer intact and passes --mini on compatible builds: the minimal, scrollback-native interface, which emits no alt-screen enter and no mouse reporting. Output lands in Daintree's scrollback and stays selectable. Turn on Use alt-screen mode, or flip the per-agent or per-preset override, and the flag is dropped.
run subcommand. Current OpenCode documents an --auto flag on the interactive TUI that auto-approves permissions that aren't explicitly denied; if you want it, add it yourself under Custom arguments, for the agent or in a preset. Otherwise approve inside the session as usual.Daintree MCP servers
When the MCP server is on (Settings > MCP server) and the project's Agent integrations setting is Core or Full, or the project has turned on a plugin's agent tools, each new OpenCode launch gets those servers as inline JSON in OPENCODE_CONFIG_CONTENT, which OpenCode deep-merges over every config file. If your environment already sets that variable, Daintree carries its value into the merged one. Nothing is written into your OpenCode configuration or the repository.
Resuming Sessions
Daintree captures OpenCode's session ID and resumes with opencode -s <session-id>. Quit cleanly with /quit so the ID is captured. When capture misses, the fallback is opencode --continue, which reopens OpenCode's latest session for that directory, subject to the sibling-pane ownership checks that prevent two panes reopening the same conversation. For the resume mechanics across all agents, see Session Resume.
opencode isn't detected after install, confirm it's on your PATH (command -v opencode on macOS/Linux, where.exe opencode on Windows), then restart Daintree. See Agent Availability for the five detection states, and Presets for launch configurations.Integration reference
This guide describes Daintree's checked-in integration. Its agent definition records the launch command, install guidance, authentication probes, rendering capabilities, MCP wiring, and resume support. Authentication badges report local evidence; the CLI still owns sign-in and provider access. After changing an installation, use Re-check in Settings > CLI agents; restart Daintree if its inherited PATH has changed.