Skip to content

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

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

proposal(scheduled-tasks): first-class Scheduled Tasks#3501
reachjalil wants to merge 34 commits into
devfrom
codex/scheduled-tasks

Conversation

@reachjalil

@reachjalil reachjalil commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Important

Draft 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.
  • Marking this draft ready, requesting review, merging, releasing, or deploying as part of this 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 (UTC)
openwork-app Ready Ready Preview Aug 4, 2026 12:35pm
openwork-den Ready Ready Preview Aug 4, 2026 12:35pm
openwork-den-worker-proxy Ready Ready Preview Aug 4, 2026 12:35pm
openwork-diagnostics Ready Ready Preview Aug 4, 2026 12:35pm
openwork-landing Ready Ready Preview, v0 Aug 4, 2026 12:35pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant