Skip to content

[codex] Add async exec job polling - #15

Merged
arslnb merged 1 commit into
mainfrom
codex/async-exec-jobs
Jul 1, 2026
Merged

[codex] Add async exec job polling#15
arslnb merged 1 commit into
mainfrom
codex/async-exec-jobs

Conversation

@arslnb

@arslnb arslnb commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #14.

Adds a first-class async exec job model for POST /v1/sandboxes/:id/exec with background: true:

  • returns 202 Accepted with a cmd_id, status_url, and logs_url
  • adds GET /v1/sandboxes/:id/exec/:cmd_id for status and exit code polling
  • adds GET /v1/sandboxes/:id/exec/:cmd_id/logs for captured stdout/stderr snapshots
  • persists exec jobs in SQLite and marks in-flight jobs failed after control-plane restart
  • keeps idle and pressure standby reapers from parking sandboxes with running exec jobs
  • updates TypeScript/Python SDK helpers and docs

Validation

  • cargo test -p sandboxd
  • cargo test -p sandboxd background_exec_returns_job_status_and_logs
  • npm run build in sdk/typescript
  • python -m compileall sdk/python/src/workdir
  • cargo fmt --check
  • git diff --check

@arslnb
arslnb marked this pull request as ready for review July 1, 2026 20:49
@arslnb
arslnb merged commit 589098d into main Jul 1, 2026
4 checks passed
@arslnb
arslnb deleted the codex/async-exec-jobs branch July 1, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: async exec with job handle + status/log polling (no in-guest workarounds)

1 participant