The changes most likely to be accepted are:
UI and core product features require design review before implementation. If you are unsure whether a change fits, ask a maintainer or choose an issue labeled help wanted, good first issue, bug, or perf.
Want to take on an issue? Leave a comment and a maintainer may assign it unless it is already being worked on.
[!NOTE] PRs that ignore these guardrails will likely be closed.
New providers should rarely require OpenCode changes. Add the provider to models.dev first.
OpenCode requires Bun 1.3 or newer. From the repository root:
bun install
bun dev [directory]
bun dev runs the V2 CLI and TUI. Pass a directory to open another project, or . to open this repository.
To test a development TUI against your installed OpenCode V2 background service and live sessions:
bun run dev:live [directory]
For web development, run the backend and app in separate terminals. Other interfaces have root scripts:
bun dev serve --port 4096
bun run dev:web
bun run dev:desktop
bun run dev:www
packages/schema: shared wire and storage contractspackages/core: domain behavior and persistencepackages/protocol: public API definitionspackages/server: HTTP server and runtime compositionpackages/client: generated TypeScript clientspackages/cli: command-line entrypoint and service lifecyclepackages/tui: terminal interfacepackages/app: shared web interfacepackages/desktop: Electron desktop applicationpackages/plugin: plugin APIRun typechecks, and tests where defined, from the affected package rather than the repository root:
cd packages/core
bun run test
bun typecheck
Follow package-specific instructions in nearby AGENTS.md files. After changing the public Protocol or Server HttpApi, run bun run generate from packages/client; never edit generated client files directly.
Follow the repository style guide.
Bug fixes, chores, and tests must reference an existing issue. Documentation, refactor, and feature PRs are exempt from the automated linked-issue check. When required, use Fixes #123 or Closes #123 in the PR description.
Before implementing new functionality, open a feature request describing the problem, why it belongs in OpenCode, and your proposed approach if you have one. Wait for design approval before opening the implementation PR.
Base branches on v2, not dev, and complete the provided pull request template.
Long, AI-generated PR descriptions and issues may be ignored. Write a short explanation in your own words. If the change cannot be explained briefly, the PR may be too large.
Use type(scope): summary. Supported types are feat, fix, docs, chore, refactor, and test. The scope is optional.
Examples:
docs: update contributing guidefix(tui): restore scroll positionfeat(app): add workspace searchBug reports and feature requests must use their issue templates. Blank issues are not allowed; ask support and how-to questions in the Discord community.
Automated checks flag missing templates, placeholder text, AI-generated walls of text, and missing meaningful content. You have two hours to correct a flagged issue before it closes automatically. Ask a maintainer if an issue was flagged incorrectly.