Skip to content

sandboxd executor: run omp agent stages in a Firecracker VM #5

Closed

Description

@jerryfane

Parent: #2

Part of the epic. Depends on the omp agent stage. Owner: gitmoot-pipe.

Change

  • internal/sandboxd: a client for the sandboxd control API (strict profile). It can create a VM, put files in, exec with env, cwd, user and timeout, stream stdout, and destroy the VM. Auth uses the API key file.
  • sandboxd executor: creates one VM per attempt and records the VM id on the attempt before running. Then it:
    • uploads the prompt, the inputs and an omp config;
      • models.yml: baseUrl http://10.0.2.2:<host-port>, apiKey = the per-run token;
      • a private agent dir;
    • runs omp as uid 1000 and applies the omp parsing and cost guard to the streamed stdout;
    • writes output on the host;
    • always destroys the VM.
  • Recovery: after a crash, VMs recorded on interrupted attempts are destroyed.
  • Settings (sandboxd.url, api_key_file, template, host_port) live in the stagehand config, not in code.

Acceptance

  • Tests against a fake sandboxd HTTP server cover create, exec, stream, destroy, destroy on error, and recovery.
  • A real run on the hetzner2 stagehand instance completes one agent stage, after sub-issues 4 and 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions