Execution Model
When you callrun, Contree:
- Spins up an isolated microVM (~2-5 seconds)
- Mounts the specified image as the filesystem
- Injects any files from
directory_state_idorfiles - Executes your command as root
- Captures stdout, stderr, exit code
- Optionally saves the resulting filesystem as a new image
rm -rf /, kernel exploits) are completely safe.
The disposable Flag
filesystem_changed response field:
- When
true,result_imageis a new UUID (changes were saved) - When
false,result_imageequals input image (no snapshot created)
Images
Every image is:- Immutable: Once created, it never changes
- Identified by UUID:
abc123-def456-789012 - Optionally tagged: Human-readable names like
python:3.11
Lineage
When you run withdisposable=false and filesystem changes, Contree creates a parent-child relationship:
Timeouts and Output
- Default timeout: 30 seconds (use
timeoutparameter for longer) - Default output limit: 8000 bytes (~2000 tokens)
- Adjust with:
truncate_output_atparameter