Workspaces and cleanup
What SI Fabrik removes on its own, what it keeps on purpose, and how to clean up by hand without losing work.
SI Fabrik cleans up after itself, but never at the cost of work: a workspace whose branch couldn't be saved is kept, and every removal saves the branch first.
What's removed automatically#
| What | When |
|---|---|
| A task's workspace | When the task reaches a terminal state, after its branch is saved and before_remove runs |
| Workspaces of tasks already terminal | At startup |
| Agent containers | When the attempt ends (docker run --rm) |
| Hook and git containers | When the hook or git step ends |
| Linked-service containers | When the attempt ends |
| Terminal containers | When you close the terminal |
| Leftover terminal, service, hook and git containers | At startup, for this SI Fabrik instance only |
| Idle Cloudflare containers | After 30 minutes idle; the workspace is rebuilt from the saved branch next time |
| Run history | Beyond the last 200 runs per project |
| Daily spend records | Beyond the last 31 days |
What's kept on purpose#
- Workspaces whose branch couldn't be saved, for example because it diverged or is checked out in your repository. The branch is then kept under
refs/harness/saved/…in your repository. The Workspaces tab says Kept<key>: its branch couldn't be saved when a removal is refused. - Workspaces of active, handed-off or parked tasks, so the agent can pick up where it left off.
- Kept Cloudflare workspaces, until you remove them or the task ends.
Remove a workspace by hand#
- Open the Workspaces tab
Each row shows the branch, saved to repo or not saved yet, and in use when an agent is working there.
- Remove it
Press the trash button (disabled while in use) and confirm Remove
<key>. SI Fabrik saves the task branch into the project repository first; uncommitted changes are lost.
For Cloudflare workspaces, use Save branch and destroy on the Sandboxes screen's Cloudflare card. On a server, removing a workspace needs the admin role.
Stop a container by hand#
On Sandboxes → Containers, press the stop button on a row to stop and remove it. Stopping an agent's container ends its attempt abruptly; to stop an agent cleanly, use Stop in Live Agents.