Sandbox Lifecycle

Sandbox Lifecycle A lifecycle diagram generated by Archify. 01 / Sandbox phases 02 / Agent operations 03 / Terminal states Creating · sandbox create · Sandbox phases · gs run 01 Creating sandbox create gs run Starting · supervisor init · Sandbox phases · auto 02 Starting supervisor init auto Running · ready for exec · Sandbox phases · ready 03 Running ready for exec ready Idle · named sandbox · Sandbox phases · reusable 04 Idle named sandbox reusable Deleted · cleaned up · Sandbox phases · done 05 Deleted cleaned up done Executing · goose run · Agent operations · one-shot Executing goose run one-shot Interactive · goose session · Agent operations · PTY Interactive goose session PTY Errored · startup failed · Terminal states · auto-delete Errored startup failed auto-delete Timed Out · ~45s shutdown · Terminal states · background Timed Out ~45s shutdown background Legend start active state terminal success failure / exit

Lifecycle

  • • Create → Start → Run → Idle → Delete
  • • Named sandboxes persist in Idle state
  • • Ephemeral sandboxes auto-delete after run

Agent Modes

  • • Executing: one-shot goose run, no PTY
  • • Interactive: goose session with PTY
  • • Resume reconnects to Idle sandbox

Recovery

  • • Errored sandboxes auto-deleted by wrapper
  • • Delete is backgrounded (~45s shutdown)
  • • gs list shows current state