You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs/runner.md says suspend sends SIGTERM, but suspend freezes the sandbox without any signal #451
docs/runner.md says "Stop and suspend both deliver SIGTERM to PID 1." In practice, suspend doesn't send any signal. Substrate checkpoints the sandbox and freezes it, so a runner that waits for SIGTERM to flush state never gets the chance. We saw the same on Agent Substrate v0.1.0-gke.1 and v0.3.0.
Example: a command that logs when it starts and when it gets SIGTERM, writing to the durable volume:
apiVersion: ax.io/v1alpha1kind: Taskmetadata:
name: term-testatespace: defaultspec:
image: "<runner image>@sha256:..."command:
- sh
- -c
- | log() { echo "$(date +%T) $*" >> /workspace/term.log; } trap 'log got-SIGTERM; exit 0' TERM log "started pid=$$" while true; do sleep 1; donedebug: true
There's no got-SIGTERM line. On v0.3.0 the command simply starts again after resume (new PID), while PID 1 still has the golden boot's start time. On v0.1.0-gke.1 the process memory came back from the golden snapshot instead. Either way, the only thing that reliably survives a suspend is /workspace. Files in /tmp and processes started after the golden boot are gone.
Suggested fix
Correct docs/runner.md: suspend is a checkpoint with no signal, only /workspace survives, and the command may be started again on resume. It would also help to say plainly that spec.command can run during the golden boot (spec.command also runs in the golden boot #428), since that's part of the same picture for runner authors.
If a graceful suspend is wanted, ax could ask the runner before calling SuspendActor. For example, a POST /suspend on the runner's port 80 that forwards SIGTERM to the command's process group and waits (with a deadline) for it to exit or acknowledge.
Note: I opened #446 on the assumption that suspend sends SIGTERM. That request still makes sense for stop and delete, but it won't help suspend.
I am taking this on. I will correct the suspend lifecycle descriptions in docs/runner.md and docs/sandbox.md, verify the behavior against the pinned local AX/Substrate lab, and include reproducible commands and captured output in the PR. I will keep graceful-suspend implementation out of this documentation change.
Activity
erain commentedon Oct 13, 2026
I am taking this on. I will correct the suspend lifecycle descriptions in docs/runner.md and docs/sandbox.md, verify the behavior against the pinned local AX/Substrate lab, and include reproducible commands and captured output in the PR. I will keep graceful-suspend implementation out of this documentation change.
feat(task): add spec.budget.activeDeadline to bound a task's running …
feat(task): add spec.budget.activeDeadline to bound a task's running …