← 返回观察名单Back to watchlist
CODING AGENT · SECURITY-AWARE REVIEW

OpenCode

MIT 许可、模型供应商中立的开源编程 Agent,提供终端、桌面、IDE、服务器与可扩展工具链。

An MIT-licensed, provider-neutral coding agent spanning terminal, desktop, IDE, server and extensible tool workflows.

结论:OpenCode 的开放性、模型选择和产品完成度都很有吸引力,适合不愿绑定单一厂商的开发者。但官方明确说明它不提供安全沙箱;权限提示只是帮助用户知情,不能阻止恶意命令逃出工作区。
Verdict: OpenCode combines provider choice, openness and a mature product surface. It is compelling for developers avoiding a single-vendor stack, but its official threat model explicitly says the permission system is not a security sandbox.

它解决什么问题?

OpenCode 把代码库读取、精确编辑、补丁、Shell、LSP、网页访问、MCP、自定义工具和技能放进一个 Agent 工作流。它提供 TUI、CLI、桌面 App、IDE、GitHub/GitLab 集成以及可选服务器模式。

内置 Build Agent 用于完整开发操作,Plan Agent 默认只读,并在运行 Bash 前询问。工具权限可以按 allow、ask、deny 配置,也能用通配符约束特定 MCP 工具。

为什么是 85 分?

What does it solve?

OpenCode combines repository reading, precise edits, patches, shell, LSP, web access, MCP, custom tools and skills in one agent workflow. Surfaces include TUI, CLI, desktop, IDE, GitHub/GitLab integrations and an optional server mode.

The built-in Build agent handles full development work, while Plan is read-only by default and asks before Bash commands. Tools can be set to allow, ask or deny, including wildcard rules for MCP tools.

Why 85?

维度 / Dimension得分 / Score当前依据 / Evidence
实用价值 / Utility24/25代码、工具、桌面、IDE 与自动化入口覆盖完整
可用程度 / Usability18/20跨平台安装方式多,TUI 与桌面体验清晰
项目健康 / Health15/15高频开发、文档完善,采集当天仍有代码推送
热度动量 / Momentum15/15公开社区规模和增长信号都很强
安全隐私 / Safety4/15官方明确无安全沙箱;服务器与外部工具需额外隔离
成本 / Cost9/10MIT 许可,模型成本可按提供商与使用方式选择

最容易误判的安全边界

  • Ask 不是沙箱:确认界面能减少误操作,但不构成进程、文件或网络隔离。
  • Plan 不是容器:默认只读策略有帮助,但真正隔离仍需 Docker、虚拟机或受限环境。
  • 服务器模式需要密码:启用后应设置服务器密码,并限制监听地址与网络入口。
  • MCP 不在核心信任边界内:第三方服务器的行为和数据处理需要单独评估。

试用时重点看什么?

用真实仓库完成“解释—修改—测试—失败恢复”任务,同时记录模型切换体验、权限确认次数、错误修改和总成本。涉及不可信仓库时,应在容器或虚拟机内测试。

来源与边界

功能、权限和安装信息来自 OpenCode 官方仓库及官方文档;无沙箱与服务器模式结论来自官方 SECURITY.md。指标来自 GitHub REST API。尚未完成统一任务实测,初评置信度 76%。

The security boundary most users miss

  • Ask is not a sandbox: prompts improve awareness but do not isolate processes, files or networks.
  • Plan is not a container: read-only defaults help, while real isolation still requires Docker, a VM or another restricted environment.
  • Server mode needs authentication: configure its password and restrict network exposure.
  • MCP is outside the core trust boundary: assess third-party servers and their data handling separately.

What should a trial measure?

Use a real repository for an explain-edit-test-recover task. Track provider switching, approval count, incorrect edits and total cost. Test untrusted repositories only inside an isolated environment.

Sources and limits

Capabilities, permissions and installation come from the official repository and documentation. Sandbox and server-mode conclusions come from the official SECURITY.md. Metrics come from the GitHub REST API. No standardized task benchmark yet; confidence is 76%.