Feature proposal: scheduled prompt tools and durable cron tasks

Open 💬 1 comment Opened May 12, 2026 by guangxiangdebizi

Summary

I built a prototype that adds Claude Code-style scheduled prompt support to Codex. The implementation is available on my fork:

I tried to open a PR from guangxiangdebizi:codex/scheduled-tasks into openai/codex:main, but GitHub shows that PR creation is limited to repository collaborators, so I am opening this issue to share the module and ask whether maintainers are interested in reviewing it.

What the prototype adds

  • New built-in tools:
  • cron_create
  • cron_list
  • cron_delete
  • A new Rust crate: codex-rs/scheduled-tasks
  • Session-local scheduled prompts that enqueue synthetic user messages into the existing pending-input turn queue
  • Durable scheduled prompts persisted under CODEX_HOME/scheduled_tasks.json
  • A codex cron CLI with create, list, delete, tick, and daemon subcommands
  • A durable wake-up path that can be driven by an external cron/systemd timer through codex cron tick

Motivation

For long-running local agent workflows, it is useful to have scheduled check-ins that survive beyond one active turn. The main use case is a durable reminder/checkpoint mechanism for autonomous or semi-autonomous workflows where the agent should periodically resume a thread and inspect external state, logs, or experiment progress.

This mirrors the rough shape of Claude Code's scheduled-task idea:

  • session-only tasks for in-memory reminders while the session is alive
  • durable tasks persisted outside the live session
  • scheduled wakeups added as normal user input rather than interrupting active work

Implementation notes

The prototype intentionally keeps the first version conservative:

  • cron expressions are parsed as 5-field local-time cron specs
  • durable state is plain JSON under CODEX_HOME
  • root-thread-only tool handling prevents subagents from creating or deleting scheduled tasks
  • codex cron tick drains due durable tasks and resumes their target thread with codex exec resume

Validation

  • git diff --check passed locally
  • I could not run Rust compile/tests in the environment where this was built because cargo/rustc were not installed there

Ask

Would maintainers be open to this kind of scheduled prompt module in Codex? If yes, could someone with collaborator permissions either open a PR from my fork/branch or advise what shape would make the proposal easier to review?

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗