Guide 10 · exit codes preserved

CI for AI-written code — test before you trust

Your agent opened a PR at 3 a.m. Run its code through the tests in a disposable sandbox from CI — pilldrops exec exits with the remote command's exit code, so pipelines just work.

1

Drop this in your pipeline

# .github/workflows/agent-pr.yml (any CI works — it's just a CLI)
$ pilldrops login --key $PILLDROPS_API_KEY
$ ID=$(pilldrops --json sandbox create --template python-3.11 \
      --timeout 900 | jq -r .id)
$ pilldrops cp . $ID:/work
$ pilldrops exec $ID -- bash -c 'cd /work && pip install -e . && pytest -q'
# ↑ this line fails the CI job if the tests fail — exit code passes through
$ pilldrops sandbox rm $ID
2

Keep the receipts

$ pilldrops history --limit 20    # every CI run: duration + exact cost
a 5-min test run (2 vCPU · 2 GB) ≈ $0.011 · exec API
Start free — $5 credits Browse all 15 guides →