Use Cua Spaces with Claude Code

Connect Claude Code to a supervised Cua Space on your Mac.

Introduction

30 Second Summary

Giving an AI agent access to your own computer can feel useful right up until you wonder how to make it stop. A clear off switch makes that access easier to supervise.

In this project, you will use Cua Spaces to turn your Mac into a supervised Space that Claude Code can reach. You will prove that access is reversible through a supervised host lifecycle test.

What You'll Build

You will watch Claude inspect your Mac through Cua Spaces while the desktop remains available for your takeover.

By the end of this project, you'll have:

  • A live Spaces inventory that Claude Code returns through Cua tools in a fresh session.
  • A repeatable access boundary test that makes your Mac unavailable after you stop host sharing.
  • A supervised recovery workflow that restores host sharing before Claude inspects your Mac under your watch.
  • Secret Mission: Recover Claude Code's Cua integration after intentionally removing it without reinstalling Cua Spaces.

Are there any prerequisites?

You need an Apple silicon Mac running macOS 26 or later with Claude Code already installed. You also need internet access plus permission to change the Privacy & Security settings.

Before We Start

This step makes your reason for creating a supervised Cua Space explicit before any access is configured. Your goal is to keep Claude Code's access to your Mac observable and reversible.

Install Cua Spaces and Connect Claude Code

Claude Code cannot discover your Mac through Cua Spaces until the app is installed. Your Mac also needs to be registered as a Space before an agent can reach it.

The cua CLI provides the host controls you will use to pause or restore access later. Cua's agent integration adds skills plus an MCP server to Claude Code.

Cua also needs an account session. macOS keeps screen viewing plus computer control behind explicit permissions.

In this step, get ready to:
  • Install Cua Spaces 0.12.1 with its bundled cua CLI.
  • Connect Claude Code through Cua's agent integration.
  • Register this Mac as a Space with the requested macOS permissions.
Install the current stable release

The official installer supplies both the Cua Spaces app and the cua command. The current stable release for this project is 0.12.1.

  • Choose the tab that matches the Cua Spaces installation on your Mac.

✔️ I have the current stable release

Use this path if Cua Spaces 0.12.1 is already installed. Its installer has also supplied the cua CLI.

  • Continue to the app-opening instructions below.

ⓧ I have an older release

Your installed release is older than 0.12.1. The official installer supplies the current stable release.

  • Open macOS search from the menu bar.
  • Type Terminal.
  • Press Enter to open Terminal.
  • Install the current stable release by running this command:
curl -fsSL https://cua.ai/install.sh | sh

What does this command do?

  • The curl command downloads Cua's official macOS installer over HTTPS.
  • The installer adds the Cua Spaces app to your Mac.
  • The installer also makes the cua command available in Terminal.

You will see the installer finish after adding the current app and CLI.

Installer did not complete?

  • Confirm that your Mac has an internet connection.
  • Confirm that your Mac is running macOS 26 or later.

If the installer still stops early, help me troubleshoot the Cua Spaces installer.

ⓧ Cua Spaces is not installed

The official installer adds Cua Spaces 0.12.1 plus the cua CLI to your Mac.

  • Open macOS search from the menu bar.
  • Type Terminal.
  • Press Enter to open Terminal.
  • Install the current stable release by running this command:
curl -fsSL https://cua.ai/install.sh | sh

What does this command do?

  • The curl command downloads Cua's official macOS installer over HTTPS.
  • The installer adds the Cua Spaces app to your Mac.
  • The installer also makes the cua command available in Terminal.

You will see the installer finish after adding the app and CLI.

Installer did not complete?

  • Confirm that your Mac has an internet connection.
  • Confirm that your Mac is running macOS 26 or later.

If the installer still stops early, help me troubleshoot the Cua Spaces installer.

  • Open macOS search from the menu bar.
  • Type Cua Spaces.
  • Press Enter to open Cua Spaces.

Good, Cua Spaces is now open on your Mac. You will see its first-run setup screen.

Why use your Mac as the first Space?

Your current desktop becomes the environment Claude can inspect through Cua. You can watch each request or take control whenever you need to step in.

This path avoids creating an extra computer. It keeps the project focused on supervised access to the Mac you already use.

Connect Claude Code

Claude Code loads its available tools when a session begins. Cua must configure the agent before you start the fresh session used in the next step.

  • Select Connect Claude Code on the first screen.
  • Wait until Cua finishes configuring Claude Code.
  • Quit every open Claude Code session.

Cua has now added its skills plus the cua MCP server to Claude Code. Closing the existing sessions ensures the next session can load those tools.

Claude Code configuration did not finish?

  • Confirm that Claude Code is installed on this Mac.
  • Keep Cua Spaces open while it configures the detected agent.

If the configuration still does not finish, help me connect Claude Code through Cua Spaces.

Register this Mac as your first Space

Cua uses a browser sign-in to connect this Mac to your account. The remaining onboarding rows request the macOS permissions needed for supervised access.

  • Return to Cua Spaces.
  • Select Sign in.
  • Complete the Cua account flow in your browser.
  • Return to Cua Spaces.

The next actions grant access to your screen plus computer controls. These permissions can feel sensitive, so macOS keeps each one behind a switch that you control.

  • Select Let Cua control this Mac.
  • Turn Cua on for the requested computer-control permission in System Settings.
  • Return to Cua Spaces.

Why does Cua need control permission?

Computer-control permission lets an approved agent interact with the desktop through Cua Spaces. You retain the ability to watch the session or use the desktop yourself.

  • Select Let Cua see this screen.
  • Turn Cua on for the requested screen-viewing permission in System Settings.
  • Return to Cua Spaces.

Before you check the completed onboarding state, what message do you expect Cua Spaces to show?

  • Check the completed onboarding state in Cua Spaces.

You will see Your agent can use this Mac. This confirms that the Mac is registered as a reachable Space.

That is the sensitive setup done. The Cua host can now accept supervised connections on this Mac.

Do not see the success message?

  • Open the incomplete onboarding row in Cua Spaces.
  • Confirm that Cua is turned on for the permission requested by that row in System Settings.

If both permissions appear enabled, help me complete Cua Spaces onboarding.

Your Mac is now a supervised Cua Space with Claude Code configured to use it. Next, you will start a fresh agent session to request a live inventory of your Spaces.

Discover Your First Space

Your Mac is now registered in Cua Spaces. Claude Code is configured with the Cua integration.

Installation alone does not prove that a fresh Claude Code session loaded the Cua tools. You will send a live inventory request to test the integration.

In this step, get ready to:
  • Start a fresh Claude Code session.
  • Keep Cua Spaces visible beside the session.
  • Request your Spaces inventory through a permitted cua tool call.
Start a clean agent session

Claude Code loads its available tools when a session begins. A fresh session gives the new Cua integration a clean start.

  • Start a fresh Claude Code session using the same method you normally use.
  • Switch back to Cua Spaces from earlier.
  • Position Cua Spaces beside the fresh Claude Code session.

You should see a new Claude Code session beside Cua Spaces. Cua Spaces should still display Your agent can use this Mac.

Request the inventory

An inventory request is the first live test of the agent integration. The response must come through a Cua tool call to prove that discovery works.

Claude Code may ask for permission to use a cua tool. That confirmation keeps the request under your control.

Before you send the request, what evidence would distinguish a live Cua inventory from an answer based on memory?

  • Request your available Spaces by entering this prompt in the fresh Claude Code session:
List my Cua Spaces.

What Does This Request Prove?

  • The prompt asks Claude to query the Cua integration for your available Spaces.
  • A visible cua tool call proves that the fresh session loaded Cua's tools.
  • The returned inventory proves that Claude can discover your registered Mac.
  • Allow the cua tool call if Claude Code asks for permission.

You will see Claude complete a cua tool call before returning your Spaces list. That is your first live proof that Claude Code can discover your Mac through Cua Spaces.

No Cua Tool Call?

  • Close the current Claude Code session if its response does not show a cua tool call.
  • Start another fresh session so Claude Code reloads its configured tools.
  • Repeat the inventory request in the new session.

Help me load the Cua tools in a fresh Claude Code session.

What This Proves

The inventory proves that Claude can discover your Spaces.

The next step tests your control over that access. You will pause host sharing.

The resulting request will show whether your Mac becomes unreachable.

Your fresh Claude Code session can now discover your Mac through Cua Spaces. Next, you will pause host sharing to test the access boundary yourself.

Pause the Mac and Test the Access Boundary

Your fresh Claude Code session has already listed your Cua Spaces. That proves the integration can discover your Mac.

A supervised Space needs a reliable access boundary. The Cua host provides that boundary through an on-demand stop control.

This step tests that control with a live inspection request. The expected failure proves you can withdraw access on demand.

In this step, get ready to:
  • Check the Cua host's working state.
  • Stop host sharing from macOS Terminal.
  • Test a live Cua inspection request against the stopped Mac.
Check the working host state

The Cua CLI reports whether the host is set up. It also shows the service state plus current connections.

  • Use your Mac's app search to find Terminal.
  • Select Terminal from the results.
  • Check the service state plus connection details by running this command:
cua host status

What Does This Command Show?

  • The cua host status command reports whether this computer is set up for host access.
  • The service details show the current host state.
  • The connection details show who is connected through Cua.

You should see that this computer is set up. You should also see its service state plus connection details.

Good. You now have a working baseline to compare with the stopped state.

Status Command Not Working?

  • Check that you typed the command exactly as shown.
  • Confirm that Cua Spaces remains installed on this Mac.

Help me diagnose why the Cua host status command is not working on my Mac.

Stop host sharing

Stopping host sharing can feel drastic because access disappears immediately. Your Cua Spaces installation remains on the Mac.

Current users are disconnected. New connections are refused.

  • Stop host sharing by running this command:
cua host stop

What Does This Command Do?

  • The cua host stop command stops sharing this Mac through Cua.
  • Existing users lose their current connections.
  • Future connection attempts are refused while the host remains stopped.

Before you check, what should be different from the working state you saw earlier?

  • Verify the changed host state by running this command:
cua host status

Why Check the Status Again?

  • The second status check reads the host after the stop command has completed.
  • The changed service state provides visible evidence that the access boundary is active.

You should now see that the Cua host is stopped. Current connections are disconnected.

That is a meaningful control point. Your Mac now refuses new Cua connections while its registration remains in place.

Host Still Looks Active?

  • Confirm that the stop command appears before the second status check in Terminal.
  • Repeat the stop plus status sequence if the commands ran in the opposite order.

Help me understand why the Cua host still looks active after I stopped it.

Test the access boundary

The stopped host state proves the local control changed. A live inspection request now proves whether Claude can still reach the Mac.

  • Switch back to the Claude Code session from earlier.

Before you send the request, do you expect Claude to reach the Mac or lose the connection?

  • Send a fresh request by entering this prompt:
Use the Cua tools now. List my computers and tell me what's on this Mac. Do not answer from memory.

What Does This Request Test?

  • The request forces Claude to attempt a live Cua tool call.
  • The final sentence prevents a description based on earlier context.
  • The result tests the stopped host instead of the integration setup.
  • Approve the Cua tool request if Claude Code asks for permission.

Claude should attempt to use a Cua tool. You should see that this Mac is unavailable or that the connection is refused.

That shortfall is intentional. It proves the stopped host blocks live access while Claude Code keeps its Cua integration.

Did Claude Answer From Memory?

  • Confirm that the second host status check showed a stopped state before the request.
  • Resend the request exactly as shown so Claude must use the Cua tools.

Help me diagnose why Claude described my Mac without proving a live Cua connection.

You have proved that access to your Mac can be withdrawn on demand. Next, you will restore host sharing and complete a supervised request while you watch.

Restore the Mac and Run a Supervised Request

Your stopped Cua host proved that the access boundary works. Claude Code could no longer reach your Mac once sharing ended.

Restarting sharing fixes that stopped-host failure. A supervised request then proves that Cua Spaces is reachable while you remain in control.

In this step, get ready to:
  • Restart host sharing on your Mac.
  • Verify the restored host state from Terminal.
  • Complete a supervised request while retaining manual control.
Restart and check the host

The host service controls whether new Cua connections can reach this Mac. Starting it again restores sharing without changing your registration or permissions.

Before you run these commands, do you expect the stopped state to remain or change?

  • Restart sharing and check the resulting host state by running these commands in the Terminal from earlier:
cua host start
cua host status

What do these commands do?

  • The cua host start command starts sharing again after the earlier stop.
  • The cua host status command reports whether this computer is set up.
  • The status check also reports the service state.
  • Running both commands together confirms that the restart changed the host state.
  • Review the service state in the status output.

You should see that the host is available again. New Cua connections should no longer be refused.

Host still unavailable?

  • Repeat the start-and-status sequence above.
  • Check that Cua remains enabled for the requested permissions in macOS System Settings.
  • Keep Cua Spaces installed while you repeat the check.

help me diagnose why my Cua host is still unavailable after restarting it.

Send the official first request

A reachable host still needs a live agent request to prove the connection works. Keeping Cua Spaces visible gives you a place to observe that request.

  • Press Cmd+Space on your Mac to open the search bar.
  • Type Cua Spaces into the search bar.
  • Press Enter to open the app.
  • Position the Cua Spaces window beside the Claude Code session from earlier.
  • Return to that Claude Code session.

Before you send the request, do you expect Claude Code to regain access now that the host is running?

  • Send the official request in Claude Code by entering:
List my computers and tell me what's on this Mac

What does this request prove?

  • Listing the available computers checks that Claude Code can discover your Cua resources.
  • Describing this Mac requires a live connection to its running host.
  • The completed response proves that restarting the host restored access.
  • Approve the cua tool call if Claude Code requests permission.
Practice supervision

Supervised access lets you watch the agent while it works. Your own mouse or keyboard input lets you step in during the session.

  • Watch the active request in Cua Spaces.
  • Briefly select a harmless area of your desktop yourself.
  • Stop interacting with the desktop.
  • Wait for Claude Code to finish the request.
  • Return to the Claude Code session from earlier.
  • Confirm that the completed response identifies this Mac.
  • Confirm that Cua Spaces showed the Mac as reachable during the request.

You should see Claude describe the Mac through a permitted Cua tool call. Your brief desktop interaction proves that you retained manual control throughout the session.

Claude still cannot reach the Mac?

  • Repeat the host status check from the first substep.
  • Start a fresh Claude Code session if the Cua tools are missing.
  • Recheck the requested screen-viewing permissions in macOS System Settings.
  • Recheck the requested computer-control permissions in macOS System Settings.

help me restore Claude Code's supervised access to my Mac.

You closed the access loop. Your Mac is reachable again after a deliberate stop. You also watched Claude inspect it while keeping manual control.

Secret mission

Disconnect and Reconnect Claude Code

Remove Claude Code's Cua tools. Prove they are absent. Restore the integration without reinstalling Cua Spaces.

Clean Up Your Resources

Clean Up Your Resources

Your Cua Spaces setup can stay available, pause until your next session, or be removed from this Mac. Keeping this project on Cua Spaces Free adds no cloud-computer charge.

Resources you used:

  • Cua Spaces app at version 0.12.1 on your Mac.
  • The cua CLI with the Cua host service.
  • This Mac's local Cua host configuration.
  • Your local Cua sign-in state.
  • Cua launch-at-login registration.
  • Claude Code integration containing Cua skills plus an MCP entry.
  • macOS screen-viewing permission for Cua.
  • macOS computer-control permission for Cua.

Keep everything running

No action is needed. Choose this option if you want Claude Code to keep reaching your Mac through Cua Spaces.

  • Leave the Cua host running for continued access.
  • Keep the Claude Code Cua integration configured for fresh sessions.
  • Keep both macOS permissions enabled for supervision.
  • Leave the launch-at-login behavior enabled if you want Cua Spaces ready after sign-in.

Pause - I'll come back to this later

Stop host sharing to withdraw access while keeping the Cua software and Claude Code integration ready for later.

  • Switch back to the macOS Terminal from earlier.
  • Stop host sharing by running this command:
cua host stop

What does pausing change?

This command disconnects current users. It refuses new connections without uninstalling Cua Spaces.

  • In Cua Spaces from earlier, select Settings.
  • Select General.
  • Turn off the launch-at-login behavior.

Your Mac now refuses new Cua connections. Your configuration stays ready for the host restart when you return.

Delete - I don't want to use this again

Remove the local Cua setup from your Mac by following these actions in order. Removing the integration can feel drastic, so the preview shows the full removal plan before anything changes.

Preview the removal
  • Switch back to the macOS Terminal from earlier.
  • Preview the standard uninstall by running this command:
curl -fsSL https://cua.ai/uninstall.sh | sh -s -- --dry-run

What does the preview show?

The dry run prints every planned removal step. It changes nothing on your Mac.

Revoke the macOS permissions
  • Return to macOS System Settings from onboarding.
  • Select Privacy & Security.
  • Select the screen-viewing permission where Cua is enabled.
  • Turn Cua off.
  • Return to Privacy & Security.
  • Select the computer-control permission where Cua is enabled.
  • Turn Cua off.
Uninstall Cua Spaces

The standard uninstaller asks for confirmation before removal. Check its plan against the preview before you confirm.

  • Start the standard uninstall by running this command:
curl -fsSL https://cua.ai/uninstall.sh | sh

What does the standard uninstall remove?

  • The Cua Spaces app plus the cua CLI.
  • The Cua host service plus its launch-at-login registration.
  • Cua skills plus MCP entries in configured agents.
  • Your local Cua sign-in state.
  • Your Cua settings.
  • Your Cua caches plus logs.

The standard uninstall keeps existing Space disks with their data. This project created no extra Space disk.

The local cleanup is complete. The host plus Claude Code integration are no longer active on this Mac.

Nice Work!

Nice Work!

That's the full access loop complete! You turned your Mac into a supervised Space that Claude Code can reach through Cua Spaces.

You've learned how to:

  • Set up a reachable Mac host with the Cua app plus the cua CLI. You enabled macOS permissions for supervised screen access. You enabled macOS permissions for supervised computer control.
  • Use Cua tools in a fresh Claude Code session to list your Spaces. You watched a live request against your Mac while keeping manual control.
  • Control the host lifecycle from Terminal with the cua CLI. You observed a failed request while the host was stopped. You restored access after checking the host state.
  • Secret Mission: Removed the Claude Code integration from Cua Spaces. You confirmed the Cua tools disappeared in a fresh session. You restored the integration without reinstalling Cua Spaces.

Ready to quiz yourself?