Skip to content

feat(desktop): add opt-in Cua Driver computer use - #5533

Draft
f-trycua wants to merge 17 commits into
pingdotgg:t3code/codex-turn-mappingfrom
trycua:codex/cua-driver-rebuild
Draft

feat(desktop): add opt-in Cua Driver computer use#5533
f-trycua wants to merge 17 commits into
pingdotgg:t3code/codex-turn-mappingfrom
trycua:codex/cua-driver-rebuild

Conversation

@f-trycua

@f-trycua f-trycua commented Aug 6, 2026

Copy link
Copy Markdown

Problem

T3 Code does not currently expose an opt-in path for Codex agents to use the packaged Cua Driver integration. The original contribution in #4354 contains the intended implementation, but its branch history diverged from t3code/codex-turn-mapping, producing conflicts and an inflated 241-commit, 821-file comparison.

This PR rebuilds that contribution on the current target branch. It replays the Cua-only commit stack from injaneity's #4354, preserves the original commit authorship, and adds one small compatibility fix required by the current desktop startup graph.

Solution

  • Add a desktop-only, opt-in Computer use setting (disabled by default).
  • Package checksum-pinned Cua Driver 0.12.2 binaries for macOS, Linux, and Windows desktop artifacts.
  • Start and supervise the embedded driver within the server lifecycle.
  • Append the scoped Cua MCP configuration to Codex launch arguments without replacing user configuration.
  • Disable the integration cleanly when configuration or runtime startup fails.

The rebuilt comparison is 17 commits across 19 files, rather than the unrelated 821-file diff on #4354.

Validation

  • pnpm exec vp test run apps/desktop/src/cua/CuaDriverServerEnvironment.test.ts apps/desktop/src/settings/DesktopClientSettings.test.ts apps/server/src/cua/CuaDriverEmbedded.test.ts apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts apps/server/src/provider/Layers/codexLaunchArgs.test.ts packages/contracts/src/settings.test.ts scripts/build-desktop-artifact.test.ts — 144 tests passed
  • Targeted typechecks passed for @t3tools/desktop, t3, @t3tools/web, @t3tools/contracts, and @t3tools/scripts
  • Changed TypeScript files pass lint and formatting checks
  • git diff --check passes

Screenshots

Enabled:

Computer use enabled

Disabled:

Computer use disabled

Built with GPT-5 Codex in the Codex desktop harness.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0316da86-d01a-417a-a5fb-7f6e27dfb465

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/server/src/cua/CuaDriverEmbedded.ts

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the new Cua driver Effect code (apps/desktop/src/cua/CuaDriverServerEnvironment.ts, apps/server/src/cua/CuaDriverEmbedded.ts) and the touched call sites against the Effect service conventions. Error classes use Schema.TaggedErrorClass with structural attributes and real cause, failures are recovered with Effect.catchTags, and imports use effect/* namespaces — no Layer.succeed, ManagedRuntime.make, or runPromise misuse was introduced. One convention issue: the new startup handlers stringify the underlying defect into the log payload instead of passing it through as cause.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/desktop/src/app/DesktopApp.ts Outdated
Comment thread apps/server/src/serverRuntimeStartup.ts Outdated
@github-actions github-actions Bot added the size:XL 500-999 changed lines (additions + deletions). label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants