Terminal Lag Recovery
Recovery Workflow
Use this skill when interactive typing in the Codex terminal has become slow or stalled and the user wants local recovery.
Inspect for
zeroclawprocesses before killing anything:ps -axo pid,ppid,stat,etime,pcpu,pmem,command | rg -i 'zeroclaw|codex'Run the bundled recovery script:
python3 ~/.codex/skills/terminal-lag-recovery/scripts/recover_zeroclaw.pyIf the sandbox cannot read the process table or send signals, rerun the same command with escalated approval. Use a concise justification such as: "Do you want to allow targeted zeroclaw process cleanup to recover the lagging terminal UI?"
Report what happened:
- Say how many
zeroclawprocesses were found and terminated. - If none were found, say the cleanup was a no-op and mention any obvious high-CPU process only if you inspected it.
- Do not terminate
codex cli, Terminal, shell, or unrelated system agents as part of this skill.
- Say how many
Escalation
Start with SIGTERM. Use SIGKILL only when the user explicitly asks for a stronger cleanup or when a previously matched zeroclaw process survives SIGTERM and the user has approved escalation:
python3 ~/.codex/skills/terminal-lag-recovery/scripts/recover_zeroclaw.py --kill
Notes
- Treat "zeroclaw threads" as OS processes unless a managed-agent API explicitly exposes closable zeroclaw sessions.
- A
pkill -TERM -if zeroclawfallback is acceptable when the script is unavailable, but the script is preferred because it prints the exact matched PIDs. - If process inspection shows no
zeroclawprocess, do not invent a cleanup. State that no matching processes were present.