feat: Add OpenCode as first-class native agent
What
Add OpenCode as a first-class native agent in Happy, with the same UX as Claude Code, Codex, and Copilot — agent picker icon, model modes, permission modes, and session spawn from mobile/web.
Why
OpenCode works today via the generic ACP path (happy acp -- opencode acp), but the experience is limited:
- No agent icon in the picker
- Agent name and model not visible in the app
- Cannot spawn sessions from mobile
- Slash command menu limited to generic ACP set
- No dedicated permission/model mode configuration
OpenCode has 190k+ GitHub stars and is growing fast. Many Happy users want this (issue #265 has strong demand).
Proposed Approach
Follow the same pattern as the Copilot integration (PR #1034) — pure ACP, no cloud token needed, minimal new code:
- OpenCode implements ACP natively via
opencode acp - No API key to manage (OpenCode handles its own OAuth)
- ~350-500 lines across ~20 files (same scope as Copilot PR)
Changes across happy-cli, happy-agent, and happy-app, following the established agent registration pattern.
I Want to Implement This
Before starting: are the maintainers open to this PR? Any concerns or guidance on approach?
@bra1nDump ?
Please do! I've been looking for reliable solutions for remotely controlling opencode for a while since their first party ones... leave a lot to be desired.
Yes, I'm open to a focused OpenCode PR. CLI 1.2.1 already runs it as a plain ACP flavor via happy acp opencode; what's missing is first-class app support. Scope guidance:
- keep it pure ACP
- target native mobile, web is deprioritized
- check in here before any broad cross-package changes
- include a screen recording of spawn plus model/permission behavior end to end
Thanks for offering to build this, and thanks @abhisheksoni27 for the ping!