All Tech Notes

Tech Notes

AI Best Practices Part 2 Claude cloud sessions and sandboxing

Chris Byers

In Part 1 of this series, I covered deny permissions for operations you can’t reliably undo. The next decision is where the agent should do its work.

A developer’s laptop often has access to much more than the current task requires. It may contain SSH keys, cloud credentials, production connection settings, and unrelated client projects. An agent working on a small feature rarely needs that entire environment.

Running Claude Code in a cloud session gives you an opportunity to provide a workspace specifically for the job.

Separate the task from your laptop

By default, Claude Code cloud sessions run shell commands and file edits in isolated virtual machines managed by Anthropic. Organizations can also configure their own hosted environments, where they are responsible for isolation. Sessions can keep working after you close your laptop, and you can check progress from another device. Claude Code cloud sessions.

For me, the main advantage is being deliberate about what goes into that workspace. I would provide the repository, a way to install dependencies, and access to disposable test data. I would keep personal files and production credentials out of it.

If a task goes wrong, the consequences should be contained to resources set aside for development. That is a useful design goal when deciding how much autonomy to give an agent.

Understand what sandboxing controls

A sandbox restricts what a running process can reach. Claude Code’s sandboxed Bash tool uses operating system controls to limit filesystem and network access for shell commands and their child processes.

Filesystem restrictions determine which locations a command can read or write. Network restrictions limit the destinations it can contact. Together, they can let an agent run builds and tests while restricting access to unrelated files and external systems. Claude Code also supports local Bash sandboxing, which you can configure through /sandbox. Claude Code sandboxing.

Cloud isolation and sandbox configuration address related parts of the problem. The cloud workspace separates the work from your laptop. The environment’s access controls determine what the session can reach from there.

An agent with a valid production credential and a permitted route to the service can still affect production. Give the environment only the access needed for the task, and verify that the restrictions cover the tools being used.

Configure the environment once

Claude Code cloud environments let you configure setup scripts, environment variables, and network access. That makes it possible to prepare a repeatable starting point for tasks that need the same toolchain and dependencies. Cloud environment configuration.

For a team, I would use that setup to make the expected build and test commands work from a fresh checkout. A session that consistently starts from the repository’s declared dependencies can also expose assumptions hidden in an individual developer’s machine.

Use a development database account with access to its own data. Review connected services separately. Cloud network settings have exceptions, including enabled MCP connectors and GitHub’s separate proxy, so inspect those connections when defining the session’s scope. Cloud network access.

Work on independent tasks in parallel

Separate cloud sessions can run independently. You might assign one a focused bug fix while another updates documentation, with each producing changes for review. Parallel cloud tasks.

This works best when the tasks have clear boundaries. Two agents changing the same interface or making competing architectural decisions still need coordination. I would agree on the shared design first, then divide the implementation where the dependencies are understood.

Parallelism is useful when it increases the amount of verified work the team can integrate. The team still needs time to review the results and resolve overlapping changes.

Keep review and production access deliberate

Claude Code’s cloud workflow supports reviewing diffs and creating pull requests. Use that review point to inspect the design, confirm what was tested, and decide whether the change is ready to merge. Cloud workflow quickstart.

The deny list from Part 1 also needs to fit the workflow. For example, a blanket git push denial can interfere with publishing a branch for review. Decide how reviewed changes will leave the session, verify which permission settings the cloud session loads, and enforce protected-branch requirements at the repository host.

For a first cloud task, I would choose a small change with clear acceptance criteria. Prepare the development environment, restrict credentials and connections, let Claude implement it, and review the resulting diff and test evidence before merging.

That gives the agent room to work while keeping the business in control of the resources it can affect.

A first conversation

Let’s find a time.

Leave your contact details and I’ll get in touch to arrange a meeting. Feel free to add a message.

Your contact details and optional message