CanvasRunner
← Blog
2 min read

Is it safe to run AI-generated code on your phone?

What actually happens when you run an app an AI assistant wrote — the real risks, what a sandbox does about them, and sensible habits.

Quick answer

Treat AI-generated code like code from any stranger: it can have bugs and it can do more than you expected. Running it in an isolated sandbox — as CanvasRunner does — contains the blast radius. Still read what it does before you trust it with anything that matters.

An AI assistant will happily write you a working app in seconds. That speed can make it feel safe, which is the wrong instinct. The right instinct is the one you would apply to a script a stranger handed you: what can this actually do?

The real risks

There are two, and they are different.

Bugs. The app miscalculates, loses your data on reload, or crashes on an input the assistant did not think of. Annoying, not dangerous. This is by far the common case.

Overreach. The app does something you did not ask for — makes network requests, reads more than it needs, or includes code copied from somewhere with a problem in it. Rare in a small single-file app, but not impossible, and worth guarding against.

What a sandbox does

CanvasRunner runs each app in an isolated local sandbox. Concretely:

A sandbox does not make bad code good. It makes the consequences of bad code small and visible.

Sensible habits

The honest summary

Running a small app an assistant wrote, in a sandbox, on your own device, for your own use, is low-risk — lower than installing a random free app from a store, which runs with far more access and which you cannot read. The failure you will actually hit is a bug, and the fix for that is the Copy fix prompt loop, not a security incident.