> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autonomyai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox

> Reset a stuck project and keep its template fresh.

### `reset_project_sandbox`

Reset a project's sandbox + initialization state (the 'it's stuck, start
over' lever).

Kills the project's sandboxes and clears init state; follow with
initialize\_project to bring it back to READY. Destructive to the project's
sandbox (running tasks lose their sandbox) - confirm with the user first.
Requires an admin-level user.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>

### `refresh_project_template`

Rebuild the project's sandbox template from the repo's current HEAD.

Use when new tasks start from a stale dependency snapshot (slow installs,
missing packages). Runs in the background - poll get\_template\_refresh\_status.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>
<ParamField path="force" type="boolean" default="False">Bypass the project's refresh policy gate (still rate-limited server-side).</ParamField>

### `get_template_refresh_status`

<Icon icon="eye" /> Read-only

Template refresh state for every active workspace in the project: last
success/failure, failure reason, and whether refreshing is currently
disabled after repeated failures.

Project-wide by design - FEI returns one row per active workspace, so filter
by workspace\_id on the returned rows rather than in the request.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>

### `force_refresh_template`

Force a template refresh, bypassing the refresh policy entirely.

Stronger than refresh\_project\_template's force flag, which is still gated by
the policy cascade. Use when the policy would suppress a refresh you know is
needed. Admin-only; runs in the background - poll get\_template\_refresh\_status.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>

### `retry_template_refresh`

Clear the auto-disabled flag after repeated failures and refresh now.

When get\_template\_refresh\_status reports refreshing disabled, this is the
lever that re-enables it - use it after the root cause is fixed (e.g. an
expired token), or it will just disable itself again. Admin-only.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="workspace_id" type="UUID" required>Workspace UUID.</ParamField>

### `get_effective_refresh_policy`

<Icon icon="eye" /> Read-only

The policy actually in force after the workspace -> project -> org cascade.

Start here when asking "why isn't this project refreshing?" - it shows the
resolved answer rather than one scope's stored row.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>

### `get_refresh_policy`

<Icon icon="eye" /> Read-only

Read the policy row stored at one specific scope.

Returns only that scope's own row (absent = it inherits). For what a project
actually does, use get\_effective\_refresh\_policy. Admin-only.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="scope_type" type="string" required>Which level the policy is defined at. Resolution walks workspace -> project -> org -> global default.</ParamField>
<ParamField path="scope_id" type="UUID">Required for 'workspace' scope. For 'project' FEI resolves it from the path, and for 'org' from the project's organization.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>

### `set_refresh_policy`

Create or update the refresh policy at one scope.

Writes that scope's row, so everything below it inherits the new value -
confirm the scope with the user before setting 'org'. Admin-only.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="scope_type" type="string" required>Which level the policy is defined at. Resolution walks workspace -> project -> org -> global default.</ParamField>
<ParamField path="mode" type="string" required>'off' disables refreshes; 'scheduled' runs them on a cadence.</ParamField>
<ParamField path="enabled_triggers" type="array" required>Events allowed to kick off a refresh. Empty means none do.</ParamField>
<ParamField path="scope_id" type="UUID">Required for 'workspace' scope. For 'project' FEI resolves it from the path, and for 'org' from the project's organization.</ParamField>
<ParamField path="scheduled_interval_seconds" type="int">Cadence for 'scheduled' mode.</ParamField>
<ParamField path="interval_managed_by" type="string">Who owns the interval: 'manual' (a human set it) or 'agent'.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>

### `clear_refresh_policy`

Delete one scope's policy row so it falls back through the cascade.

Not the same as setting mode='off': this removes the override, letting the
parent scope decide again. Admin-only.

<ParamField path="project_id" type="UUID" required>Project UUID.</ParamField>
<ParamField path="scope_type" type="string" required>Which level the policy is defined at. Resolution walks workspace -> project -> org -> global default.</ParamField>
<ParamField path="scope_id" type="UUID">Required for 'workspace' scope. For 'project' FEI resolves it from the path, and for 'org' from the project's organization.</ParamField>
<ParamField path="workspace_id" type="UUID">Workspace UUID, if the project has one.</ParamField>
