Fix Cloud VM computer-use MCP setup

Merged
AU
20d ago
+760-14

Summary

Fresh Cloud VMs now expose the baked cua-driver through native MCP configuration for Claude Code, Codex, and OpenCode, so bundled agents can use computer-use tools immediately. The setup merges only the missing server entry, preserves existing MCP configuration, honors a selected OPENCODE_CONFIG path, and keeps build verification isolated from the image builder's home. Fixes #18908.

Testing

  • bun test tests/vm-devbox-image.test.ts — 46 pass, including idempotent CUA registration, selected OpenCode path, per-file OSError diagnostics, and isolated bake verification.
  • bun test tests/vm-image-manifest.test.ts — 22 pass; bun test tests/vm-image-sizes.test.ts — 8 pass.
  • Regression: bun test tests/vm-devbox-image.test.ts --test-name-pattern 'idempotent CUA MCP' — red on 0fd8d451d1, green on 55bb029452.
  • bun run typecheck — pass.
  • bun run lint:complexity — pass; 39 findings matched the grandfathered baseline.
  • python3 scripts/verify-local.py — pass; selected web feature-flag policy check. ./scripts/localize-changes — pass; no changed web keys or parity errors.
  • bash -n web/services/vms/images/devbox/agent-config.sh web/services/vms/images/devbox/cmux-opencode and git diff --check — pass.
  • Hosted Freestyle promotion run 38669994342 — passed bake, image verification, size derivation, and manifest staging for commit 725c0a1191; its provenance-backed manifest is included here. Native checks remain in hosted CI.
  • Hosted PR checks for merged head e943bdc711 — all required checks passed, including contract, reachability, Fast static checks, Web shards 1–4, Web status, ci-status, and CI guards. Native validation ran in hosted CI.
  • The merged-tree focused suite bun test tests/vm-devbox-image.test.ts tests/vm-image-manifest.test.ts tests/vm-image-sizes.test.ts — 76 pass.

Changelog

Fixed: Cloud VMs expose their baked computer-use driver to bundled agents and preserve existing MCP configuration

Proof

No UI change; runtime tests cover Claude, Codex, OpenCode, selected OpenCode config paths, idempotent writes, malformed files, and concise per-file write-error diagnostics.

Checklist

  • Behavior changes have added or updated tests, or Testing says why not
  • User-facing docs updated if needed

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes #18908 by registering the baked cua-driver in the native MCP configuration for Claude Code, Codex, and OpenCode on fresh Cloud VMs, so bundled agents can use computer-use tools immediately. Promotes a rebuilt devbox image set with the fix as the default. The setup merges only missing server entries, preserves existing user MCP configuration, honors a selected OPENCODE_CONFIG path, and reports per-file write errors without tracebacks. Build-time verification now runs in an isolated throwaway HOME.

Summary by CodeRabbit

  • New Features
    • Claude Code, Codex, and OpenCode can connect to the local CUA server when its executable is available. Existing configuration entries and file permissions are preserved. OpenCode configuration is created when its launcher runs if no configuration file exists.
    • A new devbox image set is available for desktop and base environments across sizes from sm to 2xl, with the new images selected as defaults.