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/d plus spelled-out units like 1days) 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).

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

View original on GitHub ↗