Resize volume
volume_resizeResize a persistent sandbox volume in place to grow or shrink its storage quota; no data copy, and the attached sandbox keeps running.
Instructions
Use this when the user wants to grow or shrink a persistent sandbox volume. The resize happens in place and online: the size is a filesystem quota, no data is copied, it completes in well under a second, and an attached sandbox keeps running. Both growing and shrinking are allowed, but a shrink must leave at least 10% of the new size free — check lastUsedBytes in volume_list first and pick a size comfortably above it. Calling again with the current size is a no-op. Allowed sizes are per-project (minSizeGb/maxSizeGb from GET /api/projects/:projectId/volume-limits); the server rejects anything outside that range with invalid_volume_size, so do not assume a maximum. Returns the updated volume plus sizeEnforced (whether the quota is actually enforced on the backing storage). Error codes: invalid_volume_size, volume_not_resizable, volume_too_full_to_shrink (choose a larger size), volume_resize_in_progress (retry shortly), volume_not_provisioned, volume_capacity_unavailable (not enough room on the node to grow), volume_resize_timeout (size was left unchanged; safe to retry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sizeGb | Yes | New size in GB (whole number, at least 1) | |
| volume | Yes | Volume name or ID (from volume_list) | |
| project | Yes | Project name, slug, or ID |