Feature: in-session scheduling tools (Cron + ScheduleWakeup) and a /loop command
Open 💬 0 comments Opened May 31, 2026 by panbergco
What feature would you like?
In-session scheduling so the agent can enqueue a prompt back into the running session at a future time:
- CronCreate / CronList / CronDelete — standard 5-field cron jobs (recurring or one-shot); session-only by default, or durable to
.codex/scheduled_tasks.json(recurring jobs auto-expire after 7 days). - ScheduleWakeup — a one-shot, session-only prompt after a delay in seconds (a self-wakeup / loop primitive).
/loop [interval] <prompt>— TUI command that runs a task and keeps re-triggering it via ScheduleWakeup (e.g./loop 30m check CI), with interval parsing (s/m/h/dplus spelled-out units like1days) and validation/suggestions on bad input.
Why is this valuable?
Enables periodic/recurring agent tasks (monitoring, polling, scheduled follow-ups) and self-paced long-running loops without relying on external cron.
Implementation (already done on a fork)
Implemented on a fork branch — compiles, cargo fmt clean, with unit tests. PRs to this repo are restricted to collaborators, so filing this as an issue. A maintainer is welcome to pull the branch (or I can open a PR if enabled).
- Code (branch): https://github.com/panbergco/codex/tree/feat/session-scheduling-tools
- Full diff vs
main: https://github.com/openai/codex/compare/main...panbergco:codex:feat/session-scheduling-tools - Commits:
- Add session scheduling tools (CronCreate/CronList/CronDelete/ScheduleWakeup)
- Add /loop slash command
Handlers are ToolExecutor + CoreToolRuntime, registered in spec_plan::add_core_utility_tools; tool specs live in codex-tools; the scheduler engine is in core/src/scheduled_tasks/. ~12 files, no version/lockfile changes.
🤖 Drafted with Claude Code