File Sync
Two ways to inject files into containers:| Method | Use Case | Caching |
|---|---|---|
rsync | Directories, multiple files | Yes (3-tier) |
upload | Single files, generated content | No |
rsync (Preferred)
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)
run via files parameter:
Async Execution
| Mode | Parameter | Behavior |
|---|---|---|
| Sync | wait=true (default) | Blocks until complete |
| Async | wait=false | Returns operation_id immediately |
Parallel Pattern
wait_operations Modes
"all"- Wait for all operations to complete"any"- Return when first operation completes
Operation States
| State | Description |
|---|---|
PENDING | Queued, not started |
EXECUTING | Running |
SUCCESS | Completed successfully |
FAILED | Completed with error |
CANCELLED | Cancelled by user |
When to Use Async
Usewait=false when:
- Running 2+ independent operations
- Operations are long-running (>10s)
wait=true when:
- Running a single operation
- Operations must be sequential