No Polling Agents

作者 parcadeid07ff4b06b62無授權條款3.9K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫8 個月前更新

No Polling for Background Agents

僅含說明AI & Agents
AI 產生的概覽

指導 AI 代理在等待背景代理時避免輪詢迴圈。

功能
這是一份指令文件,說明代理應如何處理平行背景代理。它建議在背景啟動代理、繼續其他工作,並且只在使用者詢問或需要結果時才查看狀態檔案。文件列出應避免的做法,例如反覆執行 sleep 加檢查的迴圈,以及不必要地阻塞等待代理。
適用情境
適用於協調多個完成後寫入狀態檔案的背景代理。當代理想要輪詢完成狀態或不必要地阻塞時使用。此技能無法由使用者直接呼叫,屬於內部操作指引。
執行需求
無需任何工具、套件或憑證;僅為指令,不附帶指令碼。

No Polling for Background Agents

When launching parallel background agents, do NOT poll with sleep loops.

Pattern

Background agents write to status files when complete. Wait for them naturally.

DO

  • Launch agents with run_in_background: true
  • Continue with other work while agents run
  • Check status file only when user asks or when you need results to proceed
  • Trust the agent completion system

DON'T

  • Run sleep 10 && cat status.txt in loops
  • Continuously poll for completion
  • Waste tokens checking status repeatedly
  • Block on agents unless absolutely necessary

When to Check Status

  1. User explicitly asks "are they done?"
  2. You need agent output to proceed with next task
  3. Significant time has passed and user is waiting

Example

typescript
// Launch agentsTask({ ..., run_in_background: true })Task({ ..., run_in_background: true })
// Continue with other work or conversation// Agents will write to status file when done
// Only check when neededcat .claude/cache/status.txt

Source

User feedback: "You can just wait until everyone pings you"

來源與署名

來源:parcadei/continuous-claude-v3位於.claude/skills/no-polling-agents提交d07ff4b

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架