For general environment configuration, see Environment Configuration. For syntax details, see the YAML Reference.
Debugging build failures
Step 1: Check the build status
Navigate to Settings > Devin’s Environment > Build History. Your build will show one of these statuses:| Status | What it means | What to do |
|---|---|---|
| Success | Everything worked | Nothing — your machine image is ready |
| Partial | Core build succeeded but some repos failed | Check which repos failed; their sessions may have issues |
| Failed | The build itself failed | Check logs for the failing step |
| Cancelled | A newer build superseded this one | Normal — start a newer build if needed |
| Skipped | No configuration changes detected | Nothing — no build was needed |
Step 2: Read the build logs
Build logs are organized by step:- Shared setup — enterprise + org-wide commands
- Clone — repository cloning
- Repo setup — per-repository commands
- Finalize — health check and image creation
name fields, the logs will show exactly which step failed. This is one of the biggest benefits of naming your steps:
Step 3: Identify the failure pattern
Clone failures
Symptom: Build fails during cloning. Common causes:- Repository access not configured — check Enterprise Settings > Integrations
- Private repo requires an authentication token
- Repository was renamed or deleted
- Network connectivity issue (VPN or proxy needed)
Dependency install failures
Symptom: Build fails during repo setup, usually onnpm install, pip install, or similar.
Common causes:
- Private package registry requires authentication — add token to Secrets
- Package version conflict — pin specific versions
- Network timeout — check if VPN is needed
- Registry URL misconfigured
maintenance section. See Configuration Examples for private registry patterns.
Timeout failures
Symptom: Build appears stuck, then fails. Common causes:- Interactive prompt waiting for input — add
-yflags, useDEBIAN_FRONTEND=noninteractive - Very large dependency installation taking too long
- Command exceeds the 1-hour timeout
initialize so they only run during builds (not every session).
Permission errors
Symptom: “Permission denied” in logs. Common causes:- Missing
sudofor system package installation - Trying to write to protected directories
- File owned by a different user from a previous build
sudo for system-level operations (apt-get, writing to /etc/, etc.). For user-level package managers (npm, pip, cargo), sudo is usually not needed.
”Command not found” errors
Symptom: A tool installed ininitialize isn’t available in maintenance or later steps.
Common causes:
- Tool installs to a directory not on
PATH - Shell profile (
.bashrc) changes not sourced in subsequent steps
$ENVRC:
Step 4: Iterate
After identifying the issue:- Fix your YAML configuration
- Save — a new build starts automatically
- Check the new build’s logs
Common errors quick reference
| Error | Likely cause | Fix |
|---|---|---|
command not found | Tool not installed or not on PATH | Add to initialize, or add to PATH via $ENVRC |
Permission denied | Missing sudo | Use sudo apt-get install for system packages |
npm ERR! 404 | Private package, no auth | Add registry auth token in maintenance (examples) |
E: Unable to locate package | apt-get update not run first | Add sudo apt-get update -qq before apt-get install |
| Timeout | Slow install or interactive prompt | Move to initialize; add -y and DEBIAN_FRONTEND=noninteractive |
| Empty config files after session start | Credentials written in initialize | Move credential steps to maintenance |
| Build succeeds but session is broken | maintenance command fails at session start | Test your maintenance commands manually in a session |
Migrating from interactive setup
If you’re currently using the legacy interactive setup (the step-by-step wizard), you can migrate to declarative configuration for better reproducibility and multi-repo support.How migration works
The legacy setup and declarative configuration each produce their own machine image. Sessions use one or the other — never a hybrid. An org-level toggle called “Use legacy machine snapshot” controls which image is used:- Toggle ON (default) — all sessions use the legacy snapshot. No disruption.
- Toggle OFF — all sessions use the declarative snapshot.
Migration steps
Prepare your configuration
Note the commands from your current interactive setup — you’ll map them to YAML sections:
| Legacy wizard step | Declarative equivalent |
|---|---|
| Git pull | Automatic (built-in) |
| Configure secrets | Secrets (unchanged) |
| Install dependencies | initialize section |
| Maintain dependencies | maintenance section |
| Set up lint | knowledge entry with name lint |
| Set up tests | knowledge entry with name test |
| Run local app | knowledge entry with name startup |
| Additional notes | knowledge entry with name notes |
Write your YAML
Go to Settings > Devin’s Environment and select your repository. Map your legacy commands:Or simply start a Devin session and ask it to set up the repo — Devin can auto-generate the configuration for you.
Save and wait for the build
Save your configuration. A build starts automatically. Monitor progress in Build History. Builds are free — they don’t cost ACUs.
Test before switching
Before migrating everyone, test the declarative setup on individual sessions using the manual override. This lets you (or whoever is iterating on the config) use the declarative snapshot while everyone else stays on the legacy snapshot.Iterate on the configuration until the declarative setup reaches full parity with your legacy environment.
Enterprise migration
For enterprises with multiple organizations:- Configure the enterprise-level YAML first — shared infrastructure like VPN, certificates, and proxy settings.
- Migrate one org at a time. Each org has its own legacy toggle, so you can migrate progressively without affecting other teams.
- Consider a test org. For large enterprises, create a dedicated test organization to validate the declarative configuration before rolling out to production orgs.
- Use Devin for scale. Devin can configure repos via parallel sessions — launch one session per repo and Devin will auto-generate configuration proposals. This works well for onboarding 10–100+ repos.
What happens to my old snapshot?
Your old snapshot is preserved. If the new declarative build fails, Devin falls back to the most recent successful snapshot (which may be your legacy one). You can also restore previous snapshots via Build History.Key differences
| Feature | Legacy (interactive) | Declarative (YAML) |
|---|---|---|
| Reproducibility | Stateful — snapshots accumulate changes over time | Fully reproducible from YAML |
| Multi-repo | One repo at a time | Multiple repos in one build with concurrent cloning |
| Maintenance | Manual “maintain dependencies” steps | Automatic — maintenance runs at session start |
| Enterprise/org layers | Not supported | 3-tier hierarchy (Enterprise → Org → Repo) |
| Devin suggestions | In-wizard only | In-session — Devin can suggest config updates |
| Cost | Wizard sessions used ACUs | Setup sessions ~1–3 ACUs; builds are free |
Frequently asked questions
General
What happens if I run a session on a repo that isn’t set up? Devin will still work — it just has to figure out your project from scratch each time. That means spending time installing dependencies, discovering how to build and test, and guessing at conventions. Sessions take longer and cost more ACUs. Setting up your environment means Devin starts every session pre-configured and ready to go. How long does a build take? Typically 5–15 minutes depending on the number of repos and dependency sizes. Builds time out after 2 hours. How much does this cost? Builds are free — they don’t cost ACUs. If you use a Devin session to set up a repo (e.g., asking Devin to generate your configuration), that session typically costs 1–3 ACUs. Once the configuration is saved, all subsequent builds from it are free. Can I use both legacy and declarative setup? An org uses one mode at a time, controlled by the “Use legacy machine snapshot” toggle. You can configure the declarative setup in parallel while the toggle is still on (legacy mode), then switch over when ready. See the migration guide for details. Can I test declarative setup without affecting other users? Yes. Use the manual override on individual sessions to temporarily use the declarative snapshot while everyone else stays on the legacy snapshot. For enterprises, you can also create a dedicated test organization. What happens if my build fails? Devin uses the most recent successful snapshot. A failed build doesn’t break existing sessions. When should I useinitialize vs maintenance?
Use initialize for one-time tool installations (apt-get install, language runtime setup, global CLI tools). Use maintenance for dependency installation that needs to stay fresh (npm install, pip install, uv sync).
How do I add environment variables?
Write them to $ENVRC:
sudo apt-get install in your initialize section. Always use DEBIAN_FRONTEND=noninteractive and the -y flag to prevent interactive prompts.
What if I need different Node versions for different repos?
Use nvm in your repo-level config:
Build-specific
What does “partial success” mean? The core build (enterprise + org setup + cloning) succeeded, but one or more repository-level setups failed. Sessions will work, but the failed repos may not have their dependencies installed correctly. Why was my build cancelled? A newer build was triggered before your build completed. Only the latest build runs; older queued builds are cancelled automatically. Does changing one repo’s config rebuild everything? Yes — a build creates a single machine image containing all configured repos. Any change to any configuration triggers a full rebuild. Can I rollback to a previous build? Yes, via Build History in the Environment Settings. You can restore any previous successful snapshot. How many repos can I include? Up to 10 repos are cloned concurrently during a build. There’s no hard limit on total repos, but more repos mean longer builds. Devin can configure repos at scale via parallel sessions — launch one session per repo for 10–100+ repos.Enterprise-specific
Who can edit enterprise-level configuration? Enterprise admins only. Org admins can edit org-wide and repo-level config. Regular members can edit repo-level config if they have the ManageOrgSnapshots permission. See Enterprise Environment Setup for the full permissions table. Does changing enterprise config rebuild all orgs? Yes. An enterprise-level change triggers builds for every organization in the enterprise. Can different orgs have different configurations? Yes. Each org has its own org-wide config and repo-level configs. The enterprise config is shared and additive — it runs before each org’s config. Can lower-level configs override higher-level ones? No. The hierarchy (Enterprise → Org → Repo) is strictly additive. Each level’s commands run in sequence after the previous level finishes. Lower levels cannot prevent or modify what higher levels configure. Can enterprise-level config clone repositories? No. Repository cloning requires org-level access. Enterprise-level config can install shared tools and infrastructure, but repo cloning must be configured at the org or repo level.Known limitations
- No build preview/sandbox — every config change triggers a full build. Test commands in a session first.
- Serial repo setup — repository-level setup runs one repo at a time (alphabetical order). Large numbers of repos mean longer builds.
- No conditional logic in YAML — the format doesn’t support if/else. Use shell conditionals in your commands if needed (e.g.,
[ -f package.json ] && npm install). - No build log search — build logs must be scrolled manually. Use named steps to make failures easier to find.
Next steps
- Environment Configuration — main guide for writing your config
- Configuration Examples — copy-paste examples by stack and layer
