.xum/archiveruns before Xum archives the workspace..xum/deleteruns before Xum deletes the workspace.
Example
.xum/archive and make it executable:
.xum/delete instead for deletion cleanup.
Execution
The hook runs in the workspace checkout through its runtime, before runtime shutdown or checkout deletion. Xum waits for each hook, with a 60-second timeout. Hook failures do not block archive or deletion. Xum records failures in its backend logs. Hooks receive project secrets and these environment variables:XUM_PROJECT_PATHXUM_RUNTIMEXUM_WORKSPACE_NAMEXUM_WORKSPACE_ID
MUX_* aliases remain available. See environment variables.
For multi-project workspaces, Xum runs each project’s hook with that project’s secrets and checkout directory.
All projects must be trusted.
If the .xum script is absent or not executable, Xum checks the corresponding .mux script.
The legacy script must also be executable.
Only one script runs for each project and operation.
Limits
Xum skips these hooks for:- Untrusted projects or
XUM_DISABLE_PROJECT_AUTOMATION=1. - Shared-checkout sub-agents and scratch workspaces.
- Coder workspaces that the control plane does not report as running.
- Missing checkouts or unavailable runtimes. Xum does not restore checkouts or start containers to run cleanup.