#626·memU

[REFACTOR] Isolate OS-specific bridging scheduler instructions

Author: xnne-botCreated Aug 6, 2026Updated Aug 7, 2026

Problem

Claude Code、Cursor 和 Hermes 依赖 OS scheduler 执行 bridging。它们的 BRIDGING_TASK.md 目前同时包含 Unix(cron / launchd)和 Windows(Task Scheduler)两套完整注册流程。

结果是:Windows 上的 Agent 会看到 cron、bridge.sh、Unix PATH 等无关步骤;Unix 上的 Agent 会看到 Task Scheduler、S4U、PowerShell wrapper 和 schedule install 等无关步骤。这扩大了注册时的决策面,也容易让 Agent 选择不适用的平台操作。

Scope

本 issue 只处理使用 OS scheduler 的 host:

  • Claude Code
  • Cursor
  • Hermes

目标是根据当前运行 OS,将 Agent-facing 的 bridging scheduler 指引隔离开:

Windows Agent -> 仅 Windows Task Scheduler 注册 / 验证 / 卸载说明
Unix Agent   -> 仅 cron / launchd 注册 / 验证说明

Windows 和 Unix 都保留现有各自的 scheduler 实现与注册机制;本 issue 不统一 lifecycle,也不要求 Unix 新增 schedule install

Terminology

  • Pipeline prompt:一次 headless agent run 执行的 LEFTOVERS -> PREPARE -> SELF-EVOLVE -> COMMIT 自然语言任务。
  • schedule_command:host-specific 的 headless agent invocation template,例如 claude -p {prompt}cursor-agent --trust -p {prompt}hermes -z {prompt}。它不是 scheduler registration command,也不是 pipeline prompt。
  • Wrapper:scheduler 实际启动的短脚本;它读取 prompt file 并通过 schedule_command 的等价 invocation 启动 agent。

Done when

  • Claude Code、Cursor、Hermes 的 Agent-facing bridging guide 会根据当前 OS 选择对应的注册说明;
  • Windows Agent 不再看到 cron、launchd、Unix bridge.sh 或 Unix PATH 注册步骤;
  • Unix Agent 不再看到 Task Scheduler、S4U、PowerShell wrapper 或 Windows schedule install 注册步骤;
  • 现有 Windows Task Scheduler 行为不变;
  • 现有 Unix cron / launchd 行为不变;
  • 有针对 Windows 与 Unix guide selection 的测试覆盖。

Out of scope

  • 改变 pipeline prompt 内容、保存位置,或消除当前 host guide 与 Python builder 的 prompt duplication(follow-up: #628);
  • 统一或自动生成 Windows / Unix wrapper,或改变 wrapper 行为(discussion: #629);
  • 改变 schedule_command 的名称、语义或调用方式;
  • 实现跨平台统一的 scheduler lifecycle,或在 Unix 添加 schedule install
  • native scheduler host(Codex、OpenClaw、WorkBuddy)及其 lifecycle;
  • generic adapter。