How ZeroCode cloud chats run
Here’s what happens when you submit a prompt:- ZeroCode creates a container and checks out your repo at the selected branch or commit SHA.
- ZeroCode runs your setup script, plus an optional maintenance script when a cached container is resumed.
- ZeroCode applies your internet access settings. Setup scripts run with internet access. Agent internet access is off by default, but you can enable limited or unrestricted access if needed. See agent internet access.
- The agent runs terminal commands in a loop. It edits code, runs checks, and tries to validate its work. If your repo includes
AGENTS.md, the agent uses it to find project-specific lint and test commands. - When the agent finishes, it shows its answer and a diff of any files it changed. You can open a PR or ask follow-up questions.
Default universal image
The ZeroCode agent runs in a default container image calleduniversal, which comes pre-installed with common languages, packages, and tools.
In environment settings, select Set package versions to pin versions of Python, Node.js, and other runtimes.
For details on what’s installed, see
zerotwo-ai for a
reference Dockerfile and an image that can be pulled and tested locally.
While zerocode-universal comes with languages pre-installed for speed and convenience, you can also install additional packages to the container using setup scripts.
Environment variables and secrets
Environment variables are set for the full duration of the chat (including setup scripts and the agent phase). Secrets are similar to environment variables, except:- They are stored with an additional layer of encryption and are only decrypted for task execution.
- They are only available to setup scripts. For security reasons, secrets are removed before the agent phase starts.
Automatic setup
For projects using common package managers (npm, yarn, pnpm, pip, pipenv, and poetry), ZeroCode can automatically install dependencies and tools.
Manual setup
If your development setup is more complex, you can also provide a custom setup script. For example:export do not persist into the agent phase. To persist environment
variables, add them to ~/.bashrc or configure them in environment settings.
Container caching
ZeroCode caches container state for up to 12 hours to speed up new chats and follow-ups. When an environment is cached:- ZeroCode clones the repository and checks out the default branch.
- ZeroCode runs the setup script and caches the resulting container state.
- ZeroCode checks out the branch specified for the chat.
- ZeroCode runs the maintenance script (optional). This is useful when the setup script ran on an older commit and dependencies need to be updated.