Citedy Workers: marketing you turn on for a product. Not a chat.
Scout checks rival sites → Writer publishes SEO → shorts to Reels/Shorts → native posts to 9 channels.
Need 1 worker or 100? Same switches. No salaries, no tool stack per hire. Pause anytime.
https://t.co/9srL236DA9
---
name: cleanup-agent-processes
description: Audit and safely reclaim local agent resource leaks. Use when Codex, Claude Code, Playwright, Chrome DevTools, Node MCP servers, or abandoned Git worktrees consume CPU, memory, or disk. Detects known orphaned MCP processes and clean inactive worktrees whose commits are already reachable from the repository default branch; supports dry runs and explicit cleanup.
---
# Cleanup Agent Processes
Use the bundled script as the single cleanup surface for local agent process leaks and obsolete Git worktrees. It never uses `rm`, never deletes a dirty worktree, and requires `--apply` before changing anything.
## Default invocation
When the user invokes `$cleanup-agent-processes` without asking for an audit, dry-run, report, or worktree cleanup, reclaim stale agent Node/MCP processes in the same task. First run the stale dry-run, then run the same command with `--apply` without requesting a second confirmation. Do not add `--force`.
Keep worktrees audit-only unless the user explicitly asks to remove them. The script CLI remains dry-run by default; this auto-cleanup policy applies to an explicit skill invocation.
## Audit first
Run the matching dry-run command and report the candidate count, reclaimable memory or disk, and every excluded item before cleanup. For the default process-cleanup invocation, continue directly to `--apply` after this report.
```bash
SKILL="$HOME/.codex/skills/cleanup-agent-processes/scripts/reap_agent_resources.py"
python3 "$SKILL" processes
python3 "$SKILL" worktrees
```
## Reclaim agent processes
Use the default mode to end only known agent Node/MCP process trees owned by the current user whose root has been adopted by `launchd` (`PPID=1`). This does not touch a process with a live parent.
```bash
python3 "$SKILL" processes --apply
```
Use `--stale` to reclaim old idle agent Node/MCP processes that still have a live Codex parent. It requires both a minimum elapsed age and no CPU-time increase during the sample interval for every process in its descendant tree; a root with a fresh or active child is skipped. This includes CodeGraph's native Node workers, `node ./mcp/server.mjs`, and ChatGPT Computer Use's bundled `cua_node/bin/node_repl`; it excludes generic Node processes with no agent marker, such as a personal dev server. An explicit invocation of this skill authorizes the normal stale-process cleanup path.
```bash
python3 "$SKILL" processes --stale --min-age-minutes 30
python3 "$SKILL" processes --stale --min-age-minutes 30 --apply
```
Do not add `--force` unless a normal termination was tried and the user explicitly wants to end the reported survivors.
## Reclaim merged worktrees
The worktree audit discovers registered worktrees under `~/.codex/worktrees`, `~/.claude/worktrees`, and `/private/tmp/claude-*`. Add `--root "$HOME/Downloads"` for repositories outside those roots. It removes a worktree only when all checks pass:
- Git marks its registration prunable, or its `HEAD` is already reachable from the local default branch;
- it is clean, unlocked, not the primary worktree, and no process has its working directory inside it;
- its last commit is at least 14 days old by default.
```bash
python3 "$SKILL" worktrees --min-age-days 14 --sizes
python3 "$SKILL" worktrees --min-age-days 14 --apply
```
Pass `--refresh` only when current remote truth is needed; it runs `git fetch --prune` but still does not delete without `--apply`.
Use `--root /path` to audit a location outside the defaults. The script calls `git worktree remove` without `--force`, so Git itself makes a final dirty-worktree check; prunable missing paths are cleaned with `git worktree prune --expire now`.
Pass `--verbose` only when individual protected paths are needed; the default output groups them by protection reason.
## Verify
After an apply run, repeat the matching dry run. Report any survivors and protected worktrees instead of broadening the selector.
@jun_song Cuz of Meta corruption (with app publishing support etc) imho they lost all respect from dev community. Actually none cares what they release.