Delete an EvE Run
Delete only run roots explicitly named by the user. Treat this as destructive and irreversible.
Delegate the Deletion
- Always use a subagent to execute the permission changes, deletion, and final existence checks. This isolates destructive command output from the main conversation.
- Before delegating, have the main agent validate the user's deletion authorization and every exact absolute run path.
- Give the subagent only the validated paths, steps 3–6 below, and the instruction not to discover, select, or delete any additional run.
- Require a concise per-path result:
DELETED,ALREADY_ABSENT, orSTILL_EXISTS, plus only the final relevant error when unsuccessful. - Keep the main agent responsible for reporting the outcome to the user.
- If no subagent facility or concurrency slot is available, stop and report that deletion could not be delegated. Do not fall back to deleting from the main agent.
Workflow
- Resolve every requested path and verify that it is a specific run directory below the repository's
.runs/eve/tree. Reject.runs/eve, an app directory, an empty value,/, paths outside the repository, and paths containing unresolved variables or globs. - Check whether each path exists. Report already-absent paths instead of treating them as failures.
- Check for an active EvE process that references the exact run path. If one exists, do not delete the live run without explicit user confirmation to stop or delete it.
- Make the run owner-writable, then delete it:
```bash
chmod -R u+rwX -- "$RUN_ROOT"
rm -rf -- "$RUN_ROOT"
```
Use chmod, not chomd. u+rwX adds read/write permission for the owner and execute permission only to directories or already-executable files.
- If
chmodfails because the sandbox exposes the filesystem as read-only, retry the same narrowly scopedchmodandrmcommands with the environment's escalation mechanism. Do not broaden the path or use a wildcard. - Verify completion with an existence check for every exact path:
```bash
if [ -e "$RUN_ROOT" ]; then
echo "STILL_EXISTS $RUN_ROOT"
else
echo "DELETED $RUN_ROOT"
fi
```
- Report each run as deleted, already absent, or still present. Never claim success solely from
rmproducing no output.
Guardrails
- Require an explicit deletion request; inspection, debugging, or status requests do not authorize deletion.
- Quote paths and pass
--before path arguments. - Never use globbing, command substitution, or a partially constructed path with
rm -rf. - Preserve unrelated runs and files.
- Do not use
sudo, change ownership, or remount a filesystem unless the user separately authorizes that broader action.