Inspect and manage guarded Codex App-native or launchd heartbeats for Codex main control threads. Use when the user wants Codex to periodically continue a specific thread only when it is idle, avoid interrupting active work, keep App-visible interactions, inspect thread status, or enable/disable project autopilot heartbeats.
74
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Use this skill to set up or inspect local heartbeats that periodically nudge a specific Codex thread, but only after an idle guard passes.
The pain it solves:
codex exec resume can race with the App if the target thread is still active.The bundled script reads Codex local thread metadata from ~/.codex/state_5.sqlite, checks the target rollout JSONL for recent final_answer, unresolved tool calls, and cooldown, then sends a heartbeat with codex exec resume <thread_id> only when it is safe. This is useful as a fallback, but App-native heartbeats are preferred when the user needs the interaction to show up in the Codex App UI.
Important limitation: codex exec resume is a headless fallback. It writes to the correct rollout and can complete the turn, but the currently open Codex App view may not refresh because the turn did not originate from that renderer. Do not leave long-running launchd heartbeats enabled if the user expects in-App visibility; prefer Codex App's built-in heartbeat automation or an App/server transport once a working control socket is available.
Prefer this order:
$CODEX_HOME/automations/.
turn/start.waiting_on_user_input, waiting_on_approval, active_with_flags, and recent non-terminal rollout events, so it should not inject a heartbeat while the target thread is still running.thread/resume then turn/start over the same notification stream the App can render.codex exec resume as a headless fallback.
For user-visible controller threads, prefer the Codex App automation card or automation_update tool. Do not edit $CODEX_HOME/automations/*.toml directly unless you are only inspecting/debugging.
Known local App-native heartbeat records:
cs-notes-autopilot: CS-Notes controller thread, every 120 minutes.agent-harness-heartbeat: Agent Harness controller thread.Use App-native heartbeat when the user says they want:
target_thread_id;Run from any repo:
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py heartbeat-presetsInstall built-in presets:
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py install-preset agent-harness
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py install-preset cs-notesEnable / disable:
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py heartbeat-disable agent-harness
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py heartbeat-enable agent-harnessInspect:
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py heartbeat-status agent-harness
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py --title "agent-harness 主控" --cwd /path/to/repo statusOne-off delivery test:
~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py install-preset cs-notes-testcs-notes-test runs every 30 seconds and disables itself after the first successful delivery.
status or dry-run heartbeat before enabling an automation.codex exec resume automation without idle checks.cli-resume heartbeats as headless. Confirm the user accepts log-based visibility, desktop notifications, or manual App reload before enabling them for expensive project work.turn/start; until then, codex exec resume is the practical fallback.When packaging this skill publicly, describe it as a guarded local productivity automation for Codex power users, not as an official Codex API. Be explicit that it uses local Codex state files and conservative rollout inspection, so users should treat it as best-effort and version-sensitive.
a2e95c0
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.