feat: Add OpenCode as first-class native agent - #1741
Draft
jdistler wants to merge 5 commits into
Draft
Conversation
jdistler
marked this pull request as draft
August 31, 2026 17:46
added 4 commits
August 31, 2026 12:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OpenCode as a first-class native agent across Happy (
happy-cli,happy-agent, andhappy-app), resolving #265 and implementing the proposal in #1631 with scope guidance from @bra1nDump:opencode acp)1.18.25)Closes #265, Closes #1631. cc @bra1nDump
Changes
1.
packages/happy-clihappy opencodeCLI subcommand invokingrunAcpwith{ agentName: 'opencode', command: 'opencode', args: ['acp'] }.opencodeto--helpusage and examples.spawnSessioninsrc/daemon/run.ts) to handleoptions.agent === 'opencode'.controlServer.tsandregisterCommonHandlers.tsschemas to acceptopencodeas an agent.src/utils/detectCLI.tsandsrc/api/types.ts(opencode: boolean). Added unit tests indetectCLI.test.ts.2.
packages/happy-agent'opencode'toSupportedAgentandSUPPORTED_AGENTSinsrc/machineRpc.tsandsrc/index.ts.3.
packages/happy-appopencodetoHARNESS_NAMES,HARNESS_ORDER, and availability checks insources/utils/harnessCatalog.tsandsources/sync/machineChoices.ts.opencodetoagentKeys,CODE_AGENT_DEFAULTS,persistence.ts, andops.ts.getOpenCodePermissionModesandgetOpenCodeModelModeswith custom model mode support insources/components/modelModeOptions.ts.icon-opencode.png,@2x.png,@3x.png) tosources/assets/images/.Avatar.tsxandavatarHarness.ts.app/(app)/new/index.tsx), agent settings (app/(app)/settings/agents.tsx), and composer (AgentInput.tsx).Verification
session/newlifecycle directly against local OpenCode CLI (opencode acp).happy opencodeend-to-end (spawned session and verifiedStatus: starting->Status: idle).packages/happy-cli: 87/87 test files (820 tests) passed.packages/happy-app: 106/106 test files (1,121 tests) passed.tsc --noEmittypechecks pass cleanly with 0 errors across all packages.