Skip to main content
File sync and async execution patterns.

File Sync

Two ways to inject files into containers:

rsync (Preferred)

Returns directory_state_id for use in run. Three-tier caching: Local cache → Cache by hash → Server dedup → Upload. Most files resolve from cache. Reuse across runs: The directory_state_id is valid for the session. Only re-sync when files change.

upload (Single Files)

Reference in run via files parameter:

Async Execution

Parallel Pattern

wait_operations Modes

  • "all" - Wait for all operations to complete
  • "any" - Return when first operation completes

Operation States

When to Use Async

Use wait=false when:
  • Running 2+ independent operations
  • Operations are long-running (>10s)
Use wait=true when:
  • Running a single operation
  • Operations must be sequential