본문으로 건너뛰기
cccskills
무료GitHub에 공개

codex-thread-heartbeat

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md5.8 KB
  • agents/openai.yaml261 B
  • scripts/codex-thread-queue.py28.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Codex Thread Heartbeat

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:

  • Fixed short intervals keep the agent moving, but they can interrupt active work and waste tokens.
  • Fixed long intervals are cheaper, but create annoying dead time after a task finishes.
  • Codex App threads are persistent sessions, not ordinary CLI processes; blindly running 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.

Transport Choice

Prefer this order:

  1. Codex App built-in heartbeat via App automation records under $CODEX_HOME/automations/.
    • Best for user-visible main-control threads.
    • The App bundle contains a heartbeat scheduler that checks renderer eligibility, collaboration mode, permissions, thread status, active flags, and recent rollout activity before turn/start.
    • It blocks on states such as 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.
  2. App-server control transport if a real App server control socket is exposed.
    • Best theoretical shape: thread/resume then turn/start over the same notification stream the App can render.
    • Current local App process may only expose app-server over Electron-owned stdio, not a public control socket.
  3. Launchd + codex exec resume as a headless fallback.
    • Useful for log-based automation or CLI-only workflows.
    • Keep conservative idle guards and avoid expensive prompts because the App UI may not refresh.

Quick Commands

App-Native Heartbeats

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:

  • messages visible in the Codex App thread;
  • no message injected while the thread is still running;
  • a target thread bound by target_thread_id;
  • normal App automation controls for pause/resume.

Headless Launchd Fallback

Run from any repo:

~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py heartbeat-presets

Install 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-notes

Enable / 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-harness

Inspect:

~/.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 status

One-off delivery test:

~/.codex/skills/codex-thread-heartbeat/scripts/codex-thread-queue.py install-preset cs-notes-test

cs-notes-test runs every 30 seconds and disables itself after the first successful delivery.

Safety Rules

  • Prefer status or dry-run heartbeat before enabling an automation.
  • Do not use direct codex exec resume automation without idle checks.
  • Treat 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.
  • If the user needs Codex App-visible interaction, try the built-in heartbeat automation first and keep launchd disabled until the App-visible path is verified.
  • If the App exposes an app-server control socket in the future, prefer targeted turn/start; until then, codex exec resume is the practical fallback.
  • Keep heartbeat prompts bounded: ask for one small verifiable step, status-only behavior when work is running, and explicit changed files / validation.

Open Source Positioning

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Track and synthesize current AI hotspots into a bilingual HTML daily report. Use when the user says "AI热点", asks for AI日报/AI日报 HTML/AI hot topics, or wants the best recent AI products, papers, viewpoints, and cognition-shifting items from AI/news aggregators.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

Fetch and extract full text from arxiv paper HTML pages. Invoke when user asks to read an arxiv paper, analyze a paper's content, or when given an arxiv ID/URL.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

ask-echo

무료

使用火山引擎 Ask-Echo 融合信息搜索 API 进行 web 搜索、web 搜索总结版和图片搜索。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

Build or update the BlueBubbles external channel plugin for Clawdbot (extension package, REST send/probe, webhook inbound).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read/write commands, return stable JSON, manage auth, and pair with a companion skill.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

Optimize code performance through iterative improvements (max 2 rounds). Benchmark execution time and memory usage, compare against baseline implementations, and generate detailed optimization reports. Supports C++, Python, Java, Rust, and other languages.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

huangruiteng/CS-Notes4천2026년 10월 19일 업데이트

huangruiteng의 스킬 모두 보기

이 스킬의 문제 신고