Skip to content

Add scheduled automations#830

Open
dohooo wants to merge 9 commits into
mainfrom
dohooo/codex-scheduled-tasks
Open

Add scheduled automations#830
dohooo wants to merge 9 commits into
mainfrom
dohooo/codex-scheduled-tasks

Conversation

@dohooo

@dohooo dohooo commented Jun 13, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added scheduled Automations support with persistent automation records, schedule calculation, background dispatch, and a 30-second scheduler tick.
  • Added helmor automation CLI commands plus Tauri IPC commands for listing, creating, updating, pausing/resuming, deleting, and running automations.
  • Added the Automations UI surface, sidebar entry, routing support, run-history navigation, and automation source labeling in chat messages.
  • Added changeset, in-app announcement, route tests, frontend automation tests, and pipeline snapshot coverage for automation-originated prompts.

Why

Automations let users schedule recurring prompts into existing chats or workspace-created sessions, so recurring background work can run without manually re-sending the same request.

Test notes

  • Pre-commit ran biome check --write --error-on-warnings --no-errors-on-unmatched --files-ignore-unknown=true --config-path=./biome.json.
  • Pre-commit ran cargo fmt --manifest-path src-tauri/Cargo.toml --all.
  • Pre-commit ran cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings.
  • Full test suite was not run locally for this PR creation pass.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
helmor-marketing Ignored Ignored Preview Jun 14, 2026 3:45pm

Request Review

@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 13, 2026
@dosubot

dosubot Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

📄 Knowledge review

✏️ Suggested updates

3 page suggestions need review.

Page Library Status
AGENTS /helmor/blob/main/AGENTS.md driver ⬆️ Pushed to this PR
cli-and-mcp /helmor/blob/main/docs/cli-and-mcp.md driver ⬆️ Pushed to this PR
04 - Backend Overview Helmor 🟡 Review
📝 04 - Backend Overview
@@ -22,10 +22,17 @@
 │   ├── git/        # Branch, commit, diff, push
 │   ├── forge/      # GitHub integration, PRs
 │   ├── scripts/    # Setup script execution
-│   └── terminal/   # PTY management
+│   ├── terminal/   # PTY management
+│   └── automation_commands.rs  # Automation CRUD, control
 ├── models/         # SQLite data models
 ├── workspace/      # Workspace lifecycle, file ops, PR sync
 ├── agents/         # Agent orchestration
+├── automations/    # Scheduled recurring prompts
+│   ├── mod.rs      # Reliability model, module doc
+│   ├── dispatch.rs # Fire automation runs via streaming engine
+│   ├── ops.rs      # High-level CRUD operations
+│   ├── schedule.rs # Schedule spec parsing, next-run calculation
+│   └── scheduler.rs# 30-second poll loop, claim-and-dispatch
 ├── pipeline/       # Message streaming pipeline
 ├── sidecar.rs      # Sidecar process management
 └── db/             # Connection pooling, migrations
@@ -38,7 +45,7 @@
 - **Write pool** — 1 connection to serialize mutations.
 - All connections: WAL mode, 20 MiB cache, 256 MiB mmap.
 
-Core tables: `repos`, `workspaces`, `sessions`, `session_messages`, `settings`.
+Core tables: `repos`, `workspaces`, `sessions`, `session_messages`, `settings`, `automations`.
 
 **Per-workspace locks** serialize filesystem mutations with database updates to prevent corruption when multiple operations target the same workspace.
 
@@ -52,6 +59,7 @@
 
 - **Workspace lifecycle** — two-phase creation (fast DB insert + async worktree materialization), state transitions, archiving.
 - **Session orchestration** — message persistence, stream locking, heartbeat timeout (45s), provider session resumption.
+- **Automations** — scheduled recurring prompts that run agent tasks at specified intervals, dispatched by a 30-second background scheduler tick. Automations can append to existing chats or create fresh sessions per run. The `automations` table stores automation records with schedule information, status (active/paused), `next_run_at`, and execution history.
 - **Git operations** — worktree management, branching, diffing, commit, push.
 - **Sidecar supervision** — spawn on first request, health monitoring, three-step shutdown ladder.
 

Accept · Edit · Decline


Leave Feedback Ask Dosu about helmor

natllian added 4 commits June 13, 2026 15:34
…d-tasks

# Conflicts:
#	src-tauri/src/agents.rs
#	src-tauri/src/agents/persistence.rs
#	src-tauri/src/agents/streaming/mod.rs
#	src-tauri/src/pipeline/adapter/mod.rs
#	src-tauri/tests/common/builders.rs
#	src/features/panel/message-components/user-message.tsx
…d-tasks

# Conflicts:
#	src-tauri/src/companion/rpc.rs
- adapter/mod.rs: kimi_message ThreadMessageLike literal was missing the
  new `source` field added by the automations feature (E0063, clippy break).
- marketing.css: reformat radial-gradient block to satisfy biome 2.4.16.
natllian added 3 commits June 14, 2026 22:33
…ading deletes

- Resume validation: refuse to reactivate automations pointing to deleted sessions/workspaces
- Cascade deletes: session/workspace deletion cleans up dependent automations
- Skip active session: workspace-mode automations no longer steal the user's active session
- Frontend UI: interval picker component, automation detail panel, schedule management
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants