Skip to content

Know Where Your Code Runs

Compare the Desktop shell, browser preview, and cloud build boundaries before you run a command or deploy an app.

BhaiCode runs Desktop commands on your machine, Cloud Studio previews in your browser, and some builds in temporary cloud containers. Check which environment will run your code before you approve a command or supply a credential. A Desktop shell runs with your user account’s operating-system permissions, even though it has its own process.

Review commands in Desktop

Desktop opens a pseudo-terminal (PTY) and runs the shell in a child process under your user account. The PTY separates the shell from the editor process. It doesn’t give that shell a separate user account or restrict everything it can access.

Desktop’s file safety checks reject agent file access to protected directories such as ~/.ssh, ~/.aws, and /etc. They also block writes to Windows system paths such as C:\Windows\System32. Treat those checks as restrictions on agent tools, not as an operating-system sandbox for commands you run.

When the Transparency Dock asks you to approve a networked command or an external script, read the command and its working directory before you approve it. Check which files it can reach and where it would send data. An approval doesn’t reduce the shell’s permissions.

Test frontend code in the browser preview

Cloud Studio compiles frontend applications in-browser with WebAssembly through WebContainer. The preview executes inside the browser sandbox rather than in the Desktop shell. Use it to check the running frontend before deploying. A passing preview doesn’t verify a deployed server’s permissions, environment variables, or access to a database.

Treat cloud build environments as temporary

Heavy compilation can run in an isolated cloud build container. These builds have CPU, memory, and time limits, so check the build status and logs when a job stops without producing an artifact. Don’t assume that retrying will fix a job that exceeded a resource limit.

The build service attempts to remove the temporary execution environment and workspace when the job ends, including after a failure. Don’t use the build workspace to keep files you need later. Cleanup of the temporary environment is separate from the logs and artifacts produced by the build.

Next

Was this page helpful?