Files
kandev/apps/backend/internal/agent/lifecycle
José Almeida 0c486cedde fix(sprites): DestroySandbox passes terminal StopReason so cleanup actually runs
shouldRunExecutorCleanup gates Sprites teardown on a small set of
terminal reasons (task/session archived/deleted). DestroySandbox was
calling StopInstance with an empty StopReason, which never matched
that set — so the sandbox was never actually destroyed, only the
local execution state was cleaned up. The sprite kept running
upstream until it idled out.

Pass StopReasonTaskDeleted explicitly. While here, lift the four
terminal-reason literals into named constants so callers don't have
to keep them in sync with shouldRunExecutorCleanup's switch.
2026-05-14 00:05:16 +01:00
..
2026-01-22 16:39:13 +00:00