Skip to content

Start sandbox provisioning on session create#880

Merged
nicoalbanese merged 2 commits into
mainfrom
na/27c52aea
May 15, 2026
Merged

Start sandbox provisioning on session create#880
nicoalbanese merged 2 commits into
mainfrom
na/27c52aea

Conversation

@nicoalbanese

@nicoalbanese nicoalbanese commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • start sandbox provisioning in the background when a session is created
  • add a sandbox provisioning workflow and lease helpers so chat runtime can wait for an existing setup run instead of doing all setup inline
  • persist sandbox provisioning state and migration metadata for the new run ID column
  • guard stale provisioning lease clears and archive races so duplicate setup or live archived sandboxes are avoided

Why

New sessions should begin workspace setup before the first chat turn needs the sandbox. That reduces first-message latency while preserving a fallback path where chat runtime waits for the background provisioning run when setup is still in progress.

Notes

The follow-up commit fixes concurrency edges from review: stale run IDs are cleared only by their owner, and provisioning no longer marks a session active if archive finalization wins the race.

Validation

  • bun run check
  • bun run typecheck
  • bun run ci

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-agents Ready Ready Preview May 15, 2026 9:15am

@nicoalbanese
nicoalbanese marked this pull request as ready for review May 15, 2026 09:14
@nicoalbanese nicoalbanese changed the title [codex] Fix sandbox provisioning races [codex] Start sandbox provisioning on session create May 15, 2026
@nicoalbanese nicoalbanese changed the title [codex] Start sandbox provisioning on session create Start sandbox provisioning on session create May 15, 2026
@nicoalbanese
nicoalbanese merged commit ed2aa3e into main May 15, 2026
5 checks passed
@nicoalbanese
nicoalbanese deleted the na/27c52aea branch May 15, 2026 09:19
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.

1 participant