Feature proposal: scheduled prompt tools and durable cron tasks
Summary
I built a prototype that adds Claude Code-style scheduled prompt support to Codex. The implementation is available on my fork:
- Branch: https://github.com/guangxiangdebizi/codex/tree/codex/scheduled-tasks
- Commit: https://github.com/guangxiangdebizi/codex/commit/8393465
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_createcron_listcron_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 cronCLI withcreate,list,delete,tick, anddaemonsubcommands - 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 tickdrains due durable tasks and resumes their target thread withcodex exec resume
Validation
git diff --checkpassed locally- I could not run Rust compile/tests in the environment where this was built because
cargo/rustcwere 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?
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗