spawn/packer
Ahmed Abushagur 5103a763b4
fix: packer build — OOM kill and history builtin (#2274)
* fix: claude snapshot build — remove npm fallback from install command

The native install (curl | bash) succeeds but exits non-zero due to a
PATH warning. The || fallback then tries `npm install` which doesn't
exist on the "minimal" tier → exit 127.

Fix: replace npm fallback with binary existence check (same pattern
as hermes agent). If install exits non-zero but ~/.local/bin/claude
exists, the build succeeds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: snapshot cleanup and lookup — use name prefix instead of tags

DO Packer builder `tags` only apply to the temporary build droplet,
not the resulting snapshot image. Both the workflow cleanup step and
the CLI's findSpawnSnapshot() were querying by `tag_name` which
returned nothing — old snapshots piled up and the CLI couldn't find
existing snapshots.

Fix: filter by snapshot name prefix (`spawn-{agent}-`) instead of
tags, in both the workflow and the CLI. Remove misleading `tags`
from the Packer template. Add test cases for name-prefix filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: packer build failures — OOM kill + history builtin

Two issues introduced by PR #2271 (marketplace compliance):

1. Droplet downsized to s-1vcpu-1gb (1GB RAM) — Claude's native
   installer and zeroclaw's Rust build get OOM-killed. Restore
   s-2vcpu-2gb.

2. Cleanup provisioner uses `history -c` which is a bash builtin.
   Packer runs scripts with /bin/sh (dash on Ubuntu) which doesn't
   have it → exit 127 on ALL agents. Remove it — the .bash_history
   file deletion already handles persistent history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 01:15:39 -05:00
..
scripts fix: capture claude symlink target + verify PATH (#2245) 2026-03-06 10:55:09 -05:00
agents.json fix: snapshot cleanup + claude install (name-prefix filter) (#2273) 2026-03-06 21:32:58 -08:00
digitalocean.pkr.hcl fix: packer build — OOM kill and history builtin (#2274) 2026-03-07 01:15:39 -05:00