Before Starting
- 1. Dry run: Test with 2-3 items first
- Count: "Processing 47 items, ~2 min estimated"
- Confirm destructive ops: "This will delete 200 files. Proceed?"
During Processing
- - Progress every 10 items: "23/47 complete (49%)"
- Checkpoint every 10-50 items: Save state to resume if interrupted
- On error: Log it, continue with rest (don't abort entire batch)
After Completion
Always report:
CODEBLOCK0
Error Handling
| Error | Action |
|---|
| Timeout, rate limit | Retry 3x with backoff (1s, 2s, 4s) |
| Bad format, missing data |
Skip, log, continue |
| Auth failed, disk full | Abort entire batch |
Check strategies.md for parallel vs sequential decision matrix.
Check errors.md for retry logic and rollback patterns.
Related: For delegating to sub-agents, see
delegate.
开始之前
- 1. 预运行: 先用2-3个项目测试
- 计数: 正在处理47个项目,预计约2分钟
- 确认破坏性操作: 这将删除200个文件。是否继续?
处理过程中
- - 每处理10个项目报告进度: 已完成23/47(49%)
- 每处理10-50个项目设置检查点: 保存状态,以便中断后恢复
- 遇到错误时: 记录错误,继续处理其余项目(不要中止整个批次)
完成后
始终报告:
✅ 44个成功
❌ 3个失败(已保存至failed.json以便重试)
错误处理
| 错误类型 | 处理方式 |
|---|
| 超时、速率限制 | 重试3次,间隔递增(1秒、2秒、4秒) |
| 格式错误、数据缺失 |
跳过、记录、继续 |
| 认证失败、磁盘已满 | 中止整个批次 |
关于并行与串行的决策矩阵,请查看 strategies.md。
关于重试逻辑和回滚模式,请查看 errors.md。
相关: 如需委派给子代理,请查看 delegate。