Background Agent Pings

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

Background Agent Pings

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

指導代理依靠系統提醒取得背景代理進度,而不是輪詢輸出。

功能
這個技能描述了一套處理背景代理的工作模式:啟動代理並指定輸出檔案路徑,立刻繼續其他工作,等待系統提醒告知代理進度。它建議只有在代理發出完成訊號時才讀取輸出檔案,並把 sleep 後列出目錄、tail 任務輸出或呼叫 TaskOutput 等輪詢行為列為應避免的做法。它說明輪詢會浪費 token,而 TaskOutput 會用完整的代理紀錄淹沒主上下文。
適用情境
適用於啟動背景代理並需要決定如何監控其進度的情境。適合代理非同步執行、希望避免浪費 token 的輪詢的情況。這個技能不可由使用者呼叫,屬於面向代理的內部指引。
執行需求
除了代理環境外不需要指令碼或工具;它假定可以使用背景代理啟動功能和系統提醒。

Background Agent Pings

Trust system reminders as agent progress notifications. Don't poll.

Pattern

When you launch a background agent, continue working on other tasks. The system will notify you via reminders when:

  • Agent makes progress: Agent <id> progress: X new tools used, Y new tokens
  • Agent writes output file (check the path you specified)

DO

1. Task(run_in_background=true, prompt="... Output to: .claude/cache/agents/<type>/output.md")2. Continue with next task immediately3. When system reminder shows agent activity, check if output file exists4. Read output file only when agent signals completion

DON'T

# BAD: Polling wastes tokens and timeTask(run_in_background=true)Bash("sleep 5 && ls ...")  # pollingBash("tail /tmp/claude/.../tasks/<id>.output")  # pollingTaskOutput(task_id="...")  # floods context

Why This Matters

  • Polling burns tokens on repeated checks
  • TaskOutput floods main context with full agent transcript
  • System reminders are free - they're pushed to you automatically
  • Continue productive work while waiting

Source

  • This session: Realized polling for agent output wasted time when system reminders already provide progress updates

來源與署名

來源:parcadei/continuous-claude-v3位於.claude/skills/background-agent-pings提交d07ff4b

授權條款: 無授權條款

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

檢舉或申請下架