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 从公开仓库中收录这些内容。

举报或申请下架