Feature request: /every and /after slash commands — schedule recurring and one-shot prompts in the current session (Claude Code /loop parity)
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### Describe the feature or problem you'd like to solve
Copilot CLI has no built-in way to schedule a prompt to fire later (one-shot) or repeatedly (recurring) within an active session. Today the workarounds are:
- A separate terminal running `while($true){ copilot -p "..." --yolo; Start-Sleep 300 }`, which spins up a fresh session each iteration and loses context
- An OS-level scheduled task (cron / Task Scheduler) firing `copilot -p "..."`, same context-loss problem
- `/autopilot` mode, which is "keep going until done" semantics, not "re-fire this same prompt on a cadence"
None of these preserves the live session, so they're a poor fit for use cases like "ping me to commit every 30 min", "re-run the failing test suite every 5 min until it passes", or "summarize my work so far every hour."
### Prior art: Claude Code's `/loop` skill
Claude Code ships a bundled skill called `/loop` that takes a prompt and re-issues it on a schedule within the current session, keeping conversation context intact. It's one of the more useful productivity primitives Claude Code has, especially paired with autopilot-style modes for unattended work.
### Proposed solution
Add two slash commands:
- **`/every `** — schedule the prompt to fire repeatedly every N (s/m/h). Example: `/every 5m run the test suite and tell me which tests are failing`.
- **`/after `** — schedule the prompt to fire once after N (s/m/h). Example: `/after 30s remind me to commit`.
Both commands should:
- Inject the prompt into the *current* session (preserving context, files allowed, MCP servers, instructions, etc.) rather than spawning a new one
- Be cancellable (e.g. a `/schedule list` and `/schedule cancel ` pair, or `/every` with no args showing active schedules)
- Survive `--resume` if practical, or at minimum be cleared cleanly on session end
- Respect autopilot / permission settings so the fired prompt doesn't block on confirmation unless the user wants it to
### Example workflows
1. **Test-until-green:** `/every 3m run the failing tests and report the first failure stack trace` while iterating on a fix in another editor pane.
2. **Periodic git hygiene:** `/every 30m show me my uncommitted changes and suggest a commit message if there's a clean unit of work`.
3. **One-shot reminders:** `/after 45m summarize what we've done this session so I can write a stand-up note`.
4. **Unattended polling:** `/every 10m check if PR #1234 has new review comments and respond to any obvious nits`.
### Additional context
- OS: Windows 11, PowerShell 7
- Copilot CLI: 1.0.48
- A previous version of `/help` (cached in the `fetch_copilot_cli_documentation` tool output that ships with the CLI agent harness) lists `/every` and `/after` under "Other commands" with examples — they are not actually present in v1.0.48, suggesting these may have been planned/prototyped previously. Resurrecting that design would close the gap with Claude Code's `/loop` cleanly.
- This pairs naturally with `/autopilot`: scheduled prompts in an autopilot session enable long-running unattended workflows that today require external glue.
Hướng dẫn đóng góp
Hướng nghiên cứu
Không có tệp triển khai hoặc bài kiểm thử nào được nêu tên. Trước tiên, hãy xác định phần xử lý lệnh slash hiện có và các điểm vào của session/autopilot, sau đó xem lại danh sách lệnh /help trước đây được đề cập trong issue. Được xem là hoàn thành khi /every và /after lên lịch prompt trong session hiện tại, hỗ trợ hủy, và xử lý đúng quyền cũng như việc tắt hoặc tiếp tục session.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell, shell
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100