Agentic Coding and Privacy

We would like to use Xcode's new agentic coding feature (probably with Claude Agent). I had a look at the privacy statement, and under "Third-Party Agentic Coding Tools" it says the following:

Capabilities include but are not limited to code searching, retrieving build logs, building source code, and arbitrary code execution.

This is all expected, except for the bit about "arbitrary code execution". What does this mean, exactly? This sounds like a backdoor to my machine, surely that's not it? Does "code" refer to the code in my project, or any code the agent may provide?

I know that other agentic coding tools may execute terminal commands, which you have to (or can select to) confirm first. Is that what is meant by arbitrary code execution? How arbitrary are we talking? And can I configure Xcode to always ask my permission first before any code is executed?

Unfortunately, one of the less-discussed aspects of these tools is that they do, indeed, come with risks related to execution of code and code-like things. There are two categories of code execution that can be involved in these coding agents: command line tools and your project code itself.

Xcode has a permission system that lets you govern when those command line tools get activated. We include by default a set of allowed tools that we believe should be relatively safe, but you can add or remove them freely. However, if you block every command line tool invocation, you will find that a lot of the power and delight of these agents is seriously reduced. The agents can revise code and test it, but their real power comes from the ability to string together layers of information in new and previously-unexpected-by-you ways, and a surprising amount of that comes in the form of activating command line tools to operate on cached information in the file system. To understand this experience better, I strongly recommend trying the tools out in a clean environment on a project you are building up from scratch, where you can feel comfortable trusting them to do creative-looking things. You may be surprised just how far this technology has come.

The other area, and this is a very important one to consider, is your project itself. A coding agent is designed to write code into your project, then do things like run unit tests to validate that the code it wrote is accurate. There's no getting around it: This is code execution, and you did not write that code. So you need to be prepared to trust the code that comes out of the coding agent and be OK with it being executed. That means trusting the input sources, and making sure that you don't over-entitle a process when you are using it with a coding agent. Xcode tries to help here, and won't let you launch a coding agent if you are running Xcode in a highly elevated state, but ultimately, some of these security decisions will have to be up to you and your comfort level.

Agentic Coding and Privacy
 
 
Q