Add scheduled agents with cron execution and webhook triggers#72
Merged
emal-avala merged 6 commits intomainfrom Apr 6, 2026
Merged
Add scheduled agents with cron execution and webhook triggers#72emal-avala merged 6 commits intomainfrom
emal-avala merged 6 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New `agent schedule` subcommand for managing persistent schedules and `agent daemon` for running the cron loop. Schedules are stored as JSON in ~/.config/agent-code/schedules/ and support per-job model overrides, cost limits, and turn limits. CLI: agent schedule add "0 9 * * *" --prompt "run tests" --name daily agent schedule list agent schedule run daily agent schedule enable/disable daily agent schedule remove daily agent daemon --webhook-port 8090 Webhook triggers via POST /trigger?secret=<key> allow external systems (CI, GitHub Actions, monitoring) to invoke schedules. Each run creates a session resumable via /resume <id>. Includes 18 new tests covering cron parsing, schedule storage CRUD, webhook secret lookup, and serialization roundtrips.
14 new E2E tests covering the full schedule CRUD lifecycle via the compiled binary. No API key needed — tests run fast in CI. Also moves schedule add to the early (no-LLM) path and skips the setup wizard when a subcommand is present, fixing a panic in non-TTY environments.
73c99c7 to
d556e48
Compare
Both flagged values are intentionally user-facing output: - Webhook secret shown once at creation (like API key provisioning) - Session ID is a non-secret UUID prefix needed for /resume
emal-avala
added a commit
that referenced
this pull request
Apr 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent schedulesubcommand — full CRUD for persistent schedules (add,list,run,remove,enable,disable)agent daemon— background cron loop checking schedules every 30 seconds, executing due jobs--webhook-porton daemon starts an HTTP server; external systems POST to/trigger?secret=<key>to invoke schedules on demand/resume <id>*,*/N,N-M,N,Msupport +next_after()for computing next fire timeExample usage
Architecture
Test plan
cargo clippyclean (0 warnings)cargo fmt --checkclean