Skip to content

proposal(scheduled-tasks): first-class Scheduled Tasks - #3501

Closed
reachjalil wants to merge 35 commits into
devfrom
codex/scheduled-tasks
Closed

reachjalil wants to merge 35 commits into
devfrom
codex/scheduled-tasks

Conversation

@reachjalil

@reachjalil reachjalil commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Review readiness — 2026-09-04: Incomplete. This PR is open for review. Required current-head journey evidence and upstream review have not yet been verified in this cleanup. Historical checks below retain their original scope and do not establish current merge readiness.

Important

Working candidate. The current product path is implemented and available for iteration. This is not a request to merge or a claim of release readiness.

Working deliverable

Scheduled Tasks has one independently useful outcome:

Create a workspace-scoped task as a disabled draft, review its exact authority, run it once in a fresh linked session, and inspect its durable receipt and artifacts.

The feature is behind the Scheduled Tasks feature flag. It appears as one top-level destination above Library, aggregates tasks across workspaces, and always shows the human-readable workspace while preserving workspace-scoped creation, authority, and execution.

Current product scope

  • Compact desktop master-detail UI with search and All/Active/Paused filters; narrow windows use list-to-detail navigation.
  • Human-readable task rows for name, schedule/next run, state, and workspace, with suggestions below the user's tasks.
  • Selected-task controls for Run once, Enable/Pause/Resume, editing, overflow actions, authority review, run history, linked sessions, artifacts, and immutable receipts.
  • OpenWork components, typography, spacing, simple clock iconography, and in-app confirmation modals rather than native alert windows.
  • Chat can propose a disabled Scheduled Task draft through scheduled-task.propose-draft; the capability documents exact manual/daily/weekly schedule shapes.
  • Weekly schedules render localized weekday names such as Fri, not raw day indexes.
  • The closed utility rail stays closed and compact; task content does not force it open.

Architecture boundary

  • packages/scheduled-tasks owns engine-neutral contracts, ports, schedule calculation, state transitions, tick planning, and reusable testing utilities.
  • The portable core does not import OpenCode, app UI, server routes, or SQLite infrastructure.
  • apps/server/src/scheduled-tasks owns the OpenWork adapter layer: persistence, workspace validation, execution, artifacts, scheduler lifecycle, and routes.
  • OpenCode is isolated behind opencode-execution-adapter.ts.
  • One feature module owns Scheduled Tasks composition and lifecycle; the server composition root creates, registers, starts, and stops it.
  • The app consumes a narrow ScheduledTasksClient contract.

Architecture and repository-conformance tests protect this separation.

Safety contract

  • Draft creation grants no authority and cannot enable recurrence.
  • Review binds exact workspace roots, capabilities, action classes, model/agent choice, runtime ceiling, expiry, and fixed denials.
  • Every run gets a fresh managed session and immutable run/attempt receipt.
  • External communication, destructive operations, self-modification, task mutation, native shell/edit tools, and unattended approval remain denied.
  • Permission questions or authority loss fail closed into typed needs-attention states.
  • Parent PR execution runs only while OpenWork is open. Closed-app and Den execution are separate runtime layers, not claims of this parent.

Exact integration state

  • Canonical branch: different-ai/openwork:codex/scheduled-tasks.
  • PR head: 37037cc02c6ca5a66b18a8f0cbc469fa023fa385.
  • Exact synchronized different-ai/openwork:dev: c8adbe717ac6abcc4a43472a4bb69d879dbf2ef3.
  • The only sync conflict was apps/server/src/server.ts; the resolution preserves the Scheduled Tasks stop-on-startup-failure lifecycle alongside current dev behavior.
  • Local review build: mix-tape@5f9c6159e67761638960219ae491f510f4f0d93e, whose tree exactly matches the PR head. The Electron app is running from that candidate.

Checks on the current head

  • pnpm install --frozen-lockfile — passed with pinned pnpm 11.4.0.
  • pnpm --filter @openwork/app typecheck — passed.
  • pnpm --filter openwork-server typecheck — passed.
  • node scripts/i18n-audit.mjs --ci — passed; no dangling or dynamic Scheduled Tasks keys.
  • Twelve focused chat-affordance, weekday-format, and architecture checks — passed.
  • git diff --check and exact base/PR ancestry — passed.
  • Desktop development startup, including shared types, portable package, server build, Electron 43 native dependency rebuild, and workspace load — passed.

The earlier 69-test focused suite and real Electron chat → proposal card → review journey remain useful prior-head provenance. They were not rerun on this synchronization checkpoint; broad verification is deferred until the iteration direction is selected.

Known gates and overlap

Non-goals

  • Advanced cron syntax, webhook/event/email triggers, arbitrary workflow DSLs, multi-agent DAGs, or organization-wide automation administration.
  • Automatically authorizing external communication or destructive operations.
  • Merge, release, and deployment are outside the implementation checkpoint.

# Conflicts:
#	apps/app/src/react-app/domains/session/chat/session-page.tsx
#	apps/app/src/react-app/shell/app-root.tsx
#	apps/app/src/react-app/shell/notification-center.tsx
#	apps/app/src/react-app/shell/session-route.tsx
#	apps/app/src/react-app/shell/use-workspace-route-state.ts
#	apps/server/src/server.ts
@vercel

vercel Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
openwork-den Ready Ready Preview Sep 5, 2026 7:57pm UTC
openwork-den-worker-proxy Ready Ready Preview Sep 5, 2026 7:57pm UTC
openwork-landing Ready Ready Preview, v0 Sep 5, 2026 7:57pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
openwork-app Skipped Skipped Sep 5, 2026 7:57pm UTC
openwork-diagnostics Skipped Skipped Sep 5, 2026 7:57pm UTC

@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 5, 2026 19:57 Inactive
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-landing with the following error:

Too many requests - try again in 5 minutes (more than 120, code: "api-deployments-flood-pro").

Learn More: https://vercel.com/docs/limits#rate-limits

@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 5, 2026 19:57 Inactive
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project openwork-den with the following error:

Too many requests - try again in 5 minutes (more than 120, code: "api-deployments-flood-pro").

Learn More: https://vercel.com/docs/limits#rate-limits

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2770189
Status: ✅  Deploy successful!
Preview URL: https://169bf055.openwork.pages.dev
Branch Preview URL: https://codex-scheduled-tasks.openwork.pages.dev

View logs

@reachjalil reachjalil closed this Sep 18, 2026

This branch was successfully deployed

2 active (outdated) and 2 inactive deployments
Preview – openwork-diagnostics — 27701893 Deployed Sep 5, 2026 by vercel[bot]
Preview – openwork-app — 27701893 Deployed Sep 5, 2026 by vercel[bot]
Preview – openwork-den-worker-proxy — 37037cc0 Deployed Aug 4, 2026 by vercel[bot]
Preview – openwork-den — 37037cc0 Deployed Aug 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants