OpenProgram Docs

Recoverable delete

Turn Scheduled task Background run Shimrm, find, git, Python, Node This computer Container, kept on host SSH host
  1. A turn, a scheduled task or a background run deletes
  2. The shim (rm, find, git, Python, Node) moves the file
  3. Into that run's trash on the machine where the file was

Which run a deletion belongs to

WorkTrash folder
Bound explicitlybind_trash_scope(owner, run, …) wins over everything below
Conversation turntrash/<session>/<turn>
Background executionThe execution id of the run doing the work
Scheduled tasktrash/task-<id>/run-<time>-<n>; a watch check uses watch-<time>. Bound in runtime/scheduler/worker.py.
Claimed jobtrash/job-<id>/…
File panel on an SSH projecttrash/files/<project key> on that host
Nothing boundNo shims; the command runs as typed

Each run folder holds manifest.jsonl, items/ and origin.json (kind, task id, title, machine, container). The format is the same on every machine.

Where the shims run

MachineHow
This computerA PATH folder with rm, rmdir, unlink (Python), and find and git (shell that only starts Python for -delete and clean); sitecustomize for Python; a Node preload that also updates ES module exports
Docker containerThe command is prefixed with a POSIX shell prelude that installs remote_delete.sh once per version. The trash is a folder of this computer mounted at its own path, so it outlives the container and lists with the local trash.
SSH hostThe same prelude; the trash is $HOME/.openprogram/trash on the host. openprogram trash list --machine and restore --machine run through the SSH backend.

The prelude needs sh, cat, mv, od and awk. Python and Node on the remote side call the shim's rm and rmdir.

Measured shells and images

WhereResult
dash, bash, zsh, ksh, shrm, rmdir, unlink, find -delete and git clean all land in the trash and restore
alpine:latestBusyBox ash looks commands up on PATH, so its applets are shimmed; a nested sh -c too
ubuntu:24.04dash; caught and restored inside the container, /tmp included
python:3.12-slimos.remove and shutil.rmtree caught through the remote sitecustomize

Not caught

BypassWhy
/bin/rm, busybox rmAn absolute path or a multiplexer skips PATH. Rewriting command text would break legitimate scripts.
rsync --deletersync deletes inside its own process. --backup-dir would keep copies but no per-file record to restore from.
Overwriting>, truncate and mv onto a file change content, not existence. Edits by the file tools keep their own file history.
Direct system callsCompiled programs, python -I or -S, and Node without the preload call unlink themselves
git aliases for cleanOnly the clean subcommand is read
Quoted paths in remote git cleanThe shell shim refuses them instead of guessing; this computer decodes them
fish or csh as SSH login shellThe prelude is POSIX shell
One-shot docker runOnly conversation containers get the trash mount

The Sandbox cannot close these gaps. Seatbelt and bubblewrap allow or deny unlink by path; denying it breaks git locks, editors and build tools, and allowing it keeps nothing. seccomp sees no paths.

Retention and opting out

SettingEffect
execution.trash_retention_days30. A run folder goes once nothing was written to it for that long; 0 keeps it.
execution.trash_max_mb5120. Oldest runs go first while the trash is larger; 0 is no limit. The run starting now is never removed.
execution.native_deletefalse. When on, commands delete for good.
openprogram trash cleanApplies both limits now

Pruning runs when a run's trash is prepared, at most once an hour. An SSH host prunes by age once a day in the prelude.

Choices and their source

ChoiceSource
On by default, one switch to turn offMiniMax Agent: permission.nativeDelete is false by default and deletions go to the system trash
30 days by ageClaude Code keeps checkpoints for cleanupPeriodDays, 30 by default
A size boundAn operating system's trash empties oldest first when it fills
Our own trash, not the system'sContainers and SSH hosts have no system trash, and a per-run manifest lets one run be listed and restored as a unit

Implementation status

Everything above is implemented: openprogram/host/sandbox/recoverable_delete.py, remote_delete.py, trash_retention.py and shims/remote_delete.sh. The user page is Deleted files.

Last updated · 2026-11-30