
If you use Claude Code on Windows and start a cloud session with uncommitted edits in your project, a safety feature you may be counting on does not apply to you. On macOS and Linux, Claude Code quietly holds back credential-shaped files from the upload. On native Windows, it does not. Anthropic’s documentation says so plainly, and almost nobody reads that far down the page.
This article walks through that gap and two other caveats from the same page. None of this is an exposé. Everything below comes from Anthropic’s own Claude Code documentation, which I read in full on 2026-10-18. The documentation is also honest about what it does well, and I will say where that is. Documentation changes, so check the page again before you rely on a detail here.
If you have not yet met cloud sessions, start with the hub article in this series, “Claude Code without your laptop.” The short version: a cloud session is a Claude Code session that runs on a computer Anthropic operates (a virtual machine, or VM, which is a computer simulated inside another computer) instead of on yours. That means your code has to get there somehow. Most of the security questions come from that single fact.
Caveat one: Windows does not get the same credential protection
When you start a cloud session from a project that is not connected to GitHub, or when your working copy has changes that have not been committed yet, Claude Code has to send those changes up to the cloud machine. The question is what gets sent.

The documentation gives two different answers depending on your operating system. For macOS, Linux, and WSL (the Windows Subsystem for Linux, a Linux environment that runs inside Windows), it says:
“Claude Code leaves uncommitted changes to files named like credentials or keys out of the upload. This includes
.envfiles, Terraform*.tfvarsfiles, and key files such asid_rsaand*.pem.”
Read that again and think about what it protects. A .env file is where many developers keep API keys and database passwords while they work. A .tfvars file holds the variables for Terraform, a tool for building cloud infrastructure, and often contains secrets. An id_rsa file is a private SSH key, the thing that proves to a server that you are you. A .pem file is another common container for keys and certificates. These are exactly the files you would hate to see land on someone else’s computer by accident, and on three of the four setups the documentation describes, the tool keeps your uncommitted edits to them out of the upload automatically.
For native Windows, meaning Windows without WSL, the same page says something different:
“uncommitted changes to tracked files upload as they are, whatever the file’s name. Stash or revert an edit you don’t want in the cloud session before you start it.”
“Whatever the file’s name” is the important phrase. On Windows there is no name-based filtering. If a tracked file has an uncommitted edit, that edit goes up exactly as it is.
What “tracked” means, and why this is narrower than it sounds
A tracked file is one that git, the version-control system most projects use, already knows about. Many people deliberately keep .env files out of git, and a file git does not track is a different case from the one this passage describes. The passage is about uncommitted changes to files that are tracked. The documentation also notes, in its section on uploading a project without a GitHub remote, that untracked files are not included in the bundle it sends.
So the exposed situation is specific. You have a credential-shaped file that git tracks, you have edited it since your last commit, and you start a cloud session on native Windows. That is not rare. A teammate commits a .env.example and you fill in real values on top of it. A config file with a placeholder password gets a real one while you test. A key file was committed years ago by someone else and you changed it while debugging. The edit never made it into a commit, which is why the tool sees it as an uncommitted change, and on Windows that edit travels.
The fix the documentation gives you
The documentation’s own advice is the second sentence of the quote: stash or revert the edit before you start the session.
In practice that means one of two things. To set the edit aside temporarily, run git stash, which tucks your uncommitted changes into a holding area and returns the file to its last committed state. You can bring the changes back afterwards with git stash pop. To throw the edit away, revert the file to its committed version. Git’s own manual explains stashing in detail at git-scm.com/docs/git-stash.
A good habit before any cloud session on Windows is to run git status first. It lists every file with uncommitted changes. If you see anything in that list that you would not paste into a public chat, deal with it before you start. If you are on macOS, Linux, or WSL, the filter exists, but the cheap check is still worth doing, because a filter based on file names can only protect files that look like credentials. A secret pasted into an ordinary source file has an ordinary name.
If you are not sure which of the two situations you are in, the safest reading is the simplest one: assume that anything with an uncommitted change in your project could be uploaded.
Caveat two: “network disabled” is not the same as “cannot leave”
Cloud sessions let an administrator or user control what the cloud machine can reach on the internet. You can restrict it, or turn network access off altogether. That sounds like the strongest possible setting: if the machine cannot reach the internet, your code cannot leave it.

The documentation does not say that. It says:
“When running with network access disabled, Claude Code can still communicate with the Anthropic API, which may allow data to exit the VM.”
This makes sense once you remember how the product works. Claude Code is an AI agent, and the thinking happens on Anthropic’s servers. For the session to function at all, it must send your code and prompts to the Anthropic API and receive answers back. “Network access disabled” therefore cannot mean total isolation. It means that the machine will not reach the wider internet, such as a random website or a package registry, while the line to Anthropic stays open.
Be careful about what this does and does not claim. It does not say Anthropic is mishandling your data. The traffic to the API is the product doing its job. What it says is that a “no network” setting should not be read as an air gap, the kind of physical separation used for the most sensitive systems. If your reason for disabling the network was “so nothing in this project can possibly leave the machine,” the setting does not deliver that promise, and the documentation says as much in its own words, using “may” rather than claiming that data will leave.
One scoping detail matters, and it is easy to lose when this sentence is quoted on its own. It describes Anthropic-hosted environments — the default, and what nearly every individual reader will be using. Organisations can instead route sessions to their own infrastructure, and there the documentation hands the job back to you: in a self-hosted environment, you restrict session egress at your own network boundary. So this is not a universal statement about every cloud session in existence; it is a statement about the ones Anthropic runs.
The practical conclusion is about what you put into the session in the first place. Treat the sandbox as a good way to limit what code the agent can fetch and run. Do not treat it as a reason to place material in the session that you would not be comfortable sending to Anthropic. That is also, not coincidentally, a reason to follow the Windows advice above.
Caveat three: sharing a session is a decision about your repository
Cloud sessions can be shared with other people. The documentation’s sharing section is easy to misread in both directions, so here is the careful version.

For Max and Pro accounts, a session’s visibility is either Private or Public, and sharing is a setting you control, not something that happens on its own. Some summaries of this feature claim that sessions are public by default. The documentation does not say that, and you should not repeat it.
The real caveat is narrower, sharper, and still worth knowing — and it is about which account you are on. The documentation describes sharing separately for the two account types, and the defaults are not the same. On Enterprise and Team accounts, repository-access verification is enabled by default. On Max and Pro accounts, the documentation lists “Repository access: verification isn’t enabled by default” as the state of that setting.
Read those two together and the finding is uncomfortable: the personal plans have the weaker default. The accounts least likely to have a security team reviewing settings are the ones where the protective check starts switched off. That is the sentence worth carrying away, rather than the garbled “sessions are public by default” version. Repository access verification is the check that a person opening a shared session actually has access to the underlying repository. Without it, the sharing setting does not tie the viewer to your repository’s permissions. The documentation then adds this warning:
“Sessions may contain code and credentials from private GitHub repositories”
A session is a transcript. It records what the agent read, what it ran, and what came back. If the agent opened a configuration file or printed an environment variable while working, that text can be in the session history. Sharing the session means sharing the transcript. So before you flip a session to Public, or send a link to someone outside your project, read through what the session contains, and consider turning on repository access verification if your plan offers it. This is the same instinct as scrubbing a screenshot before you post it.
What the documentation gets right
It would be a mistake to read the three caveats and conclude that cloud sessions are careless. The documentation describes one design choice that is better than what many tools do:

“git credentials and signing keys stay outside the sandbox, and a proxy authenticates on the session’s behalf with scoped credentials.”
In plain terms, the machine that runs the agent never holds your actual GitHub login or your commit-signing keys. When the session needs to push a change, a go-between service does the signing in on its behalf, using credentials limited to what the task needs. If something goes wrong inside the sandbox, there is no password sitting there to steal. This is a sensible way to build the feature, and it is worth saying clearly, since it sits right next to the caveats.
The same scoping applies here as to the network caveat above: this describes Anthropic-hosted environments. In a self-hosted environment your own deployment supplies the git credentials, so whether they stay outside the sandbox becomes a property of how your organisation built it rather than a guarantee you inherit. If someone tells you cloud sessions keep credentials out of the sandbox, that is true of the hosted default and is a question worth asking about anything else.
It also shows what the three caveats have in common. The strong protections cover credentials that Claude Code itself manages. The weak spots are the ones where your own files and settings come into play: an uncommitted edit on Windows, a network setting that does not mean what it sounds like, and a share link that carries a transcript.
Who cannot use cloud sessions at all
Some organizations are shut out entirely, and the reasons are security-related. As of the documentation I read on 2026-10-18, cloud sessions are not available to organizations that have Zero Data Retention, the HIPAA configuration, or customer-managed encryption keys (CMEK). The page says that CMEK organizations “can’t start cloud sessions either.” If you work for a company in one of those categories, that is not a bug to work around. It is the platform telling you that this feature does not fit those commitments.
There is also a quieter failure that has nothing to do with data. The documentation states: “If your organization has IP allowlisting enabled, every Anthropic-hosted cloud session fails with an authentication error.” IP allowlisting is a security setting that accepts connections only from approved network addresses. Cloud sessions come from Anthropic’s machines, which are not on your list, so they are refused. If your team has such a rule, cloud sessions will not work until someone resolves it, and nobody should respond to the error by loosening the rule without understanding why it was there.
A short checklist before your next cloud session
- Run
git statusand read the list of files with uncommitted changes. - On native Windows, stash or revert any edit to a credential-shaped file. The documentation says outright that file names make no difference there.
- Do not rely on “network disabled” as a guarantee that nothing leaves. The API connection stays open.
- Before sharing a session, read the transcript, and ask whether repository access verification is on.
- If a project has no GitHub remote, remember that the upload is a bundle of your committed history, and that untracked files are not included. Git describes the format at git-scm.com/docs/git-bundle.

None of this requires giving up the feature. It requires treating a cloud session the way you would treat any service that receives your code: know what goes up, know what the settings really mean, and know who can see the result. The primary source for everything above is Anthropic’s Claude Code on the web documentation, and it is worth reading once yourself.
For background on what Claude Code is and how local sessions work, see What Is Claude Code?. Cloud sessions are the sequel to that story, not a correction of it: the local behavior it describes is still accurate for sessions that run on your own machine.
Frequently Asked Questions
Does the credential protection work the same on Windows? No, and this is the most important thing on this page. On macOS, Linux and WSL, Claude Code holds back uncommitted changes to credential-shaped files — .env, Terraform *.tfvars, id_rsa, *.pem — and tells you what it left out. On native Windows, the documentation says uncommitted changes to tracked files “upload as they are, whatever the file’s name.” Stash or revert anything you do not want sent, before you start the session.
If I turn network access off, is my code sealed inside the VM? Not entirely. Anthropic’s own documentation is explicit: “When running with network access disabled, Claude Code can still communicate with the Anthropic API, which may allow data to exit the VM.” Network controls limit where the session can reach on the open internet; they do not cut the session off from the service running it.
Are shared sessions public by default? No — sharing is something you switch on. The real asymmetry is in the defaults underneath it. On Team and Enterprise accounts, repository-access verification is enabled by default; on Max and Pro accounts it is not. Personal plans have the weaker default, and the documentation warns that sessions “may contain code and credentials from private GitHub repositories.”
Can any organisation use cloud sessions? No. Organisations with Zero Data Retention, the HIPAA configuration, or customer-managed encryption keys cannot use them. Separately, if your organisation enforces IP allowlisting, every Anthropic-hosted cloud session fails with an authentication error, because the session calls the API from Anthropic’s infrastructure rather than your network.
Checked against Anthropic’s Claude Code documentation on 18 October 2026. Cloud-session behaviour changes often — re-read the page before relying on a detail here.
📦 Recommended Resources
Some links below are Amazon affiliate links. If you buy through them we earn a small commission at no extra cost to you.
Read the free primary material first, because on this topic the vendor’s documentation is the evidence. The Security and isolation section of Anthropic’s cloud sessions page is where the three caveats in this article come from, stated by Anthropic rather than alleged by us, and the Cloud environments page is where network access levels and the default allowed domains are actually defined. Both are free, and both change — the specific behaviours described above were read on 18 October 2026.
The three books below are for the reasoning underneath, which does not change when a documentation page does.
- Threat Modeling: Designing for Security by Adam Shostack — the most directly relevant book on this page. The Windows gap described above is not an exotic vulnerability; it is an assumption that quietly expired for one group of users. Shostack’s structured method is what lets you notice that kind of thing deliberately instead of by accident: enumerate what you are protecting, from whom, and — the part that matters here — write down your assumptions explicitly, so you can find them again when one stops being true.
- Building Secure and Reliable Systems by Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea and Adam Stubblefield — Google’s companion to the SRE books, and the practical treatment of the thing Anthropic’s credential proxy is an instance of: keeping secrets outside the blast radius of the code that uses them. Read the chapters on least privilege and on designing for recovery. It is also honest about cost, which is rare in security writing and is the tone this article tried to borrow.
- Security Engineering: A Guide to Building Dependable Distributed Systems by Ross Anderson — the reference that keeps being right. Its value here is breadth: a cloud session moves your code across a trust boundary you did not previously have, and Anderson has spent a career on what happens at exactly those seams. The access-control chapters are the place to start.
✅ Pro tip: If you work on Windows, make the check a habit rather than a decision. Run git status before any claude --cloud, and treat anything listed under “Changes not staged for commit” as something that is about to be uploaded — because on native Windows it is, whatever the file is called. On macOS and Linux the tool will quietly hold credential-shaped files back and print a Left on this machine: notice; on Windows there is no such notice, because there is no such protection.