Skip to content

feat: trash sweeper + stuck-run status JSON for Studio#10

Merged
rjcloudsigma merged 2 commits into
mainfrom
feat/trash-sweeper-and-stuck-runs
May 25, 2026
Merged

feat: trash sweeper + stuck-run status JSON for Studio#10
rjcloudsigma merged 2 commits into
mainfrom
feat/trash-sweeper-and-stuck-runs

Conversation

@rjcloudsigma
Copy link
Copy Markdown
Collaborator

Adds two background tasks:

Trash sweeper: Hourly cleanup of stale .deleted., .reset., .checkpoint., oversized .trajectory.jsonl, and orphaned .lock files in ~/.openclaw/agents//sessions/. All thresholds configurable via TAAS_AFFINITY_* env vars.

Stuck-run status writer: Every 30s emits ~/.openclaw/alien-studio/runs-status.json with active/warn/stuck/zombie classification based on lock-file mtime ages (5/15/60 min thresholds). The Studio reads this file via its existing filesystem-backed API to render a Stuck Runs panel with abort buttons (no gateway RPC needed — sidesteps the extraHandlers snapshot bug).

Both features hook into register(api) via startBackgroundTasks(). Time are randomised/staggered to avoid all gateway processes acting at once.

@rjcloudsigma rjcloudsigma merged commit 04fcba4 into main May 25, 2026
1 check failed
@rjcloudsigma rjcloudsigma deleted the feat/trash-sweeper-and-stuck-runs branch May 25, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant