Skip to content

automations: add service groundwork and overview - #28609

Closed
eternal-openai wants to merge 2 commits into
mainfrom
codex/automations-01-groundwork
Closed

eternal-openai wants to merge 2 commits into
mainfrom
codex/automations-01-groundwork

Conversation

@eternal-openai

@eternal-openai eternal-openai commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Stack

  1. This PR: automations: add service groundwork and overview
  2. #28610 automations: add durable state store
  3. #28611 automations: add state CRUD and scheduling
  4. #28612 automations: add dispatch claims and leases
  5. #28613 automations: add app-server protocol
  6. #28614 automations: add app-server CRUD handlers
  7. #28615 automations: add agent automation_update tool
  8. #28616 automations: dispatch runNow requests
  9. #28617 automations: add background worker loop
  10. #28618 automations: dispatch scheduled heartbeats
  11. #28619 automations: add dispatch integration coverage
  12. #28620 automations: defer heartbeats for cooldown

Overview

This stack migrates scheduled automations and heartbeats into codex-rs without reintroducing the earlier generic inbox/event-bus design. The durable source of truth is automation state in SQLite; app-server owns the public v2 API and delivery into local threads; the extension layer exposes the agent-facing automation_update tool when Feature::Automations is enabled.

image

The important concurrency decision is that multiple app-server processes may see the same automation database, but only one process owns a dispatch at a time through claim/lease fields introduced later in the stack. Cron automations create new local threads per configured cwd; heartbeats target existing threads and can later resume them without a client connection.

Why

The previous prototype grew toward a generic inbox/event queue, but the review direction settled on keeping automations, external events, agent-to-agent communication, and future queue work as separate implementations. This first PR gives the automation stack a small foundation: the feature gate, persisted thread metadata helpers, and thread lineage/runtime metadata needed by later automation dispatch without adding the automation APIs yet.

What Changed

  • Adds Feature::Automations as an under-development, default-off feature gate.
  • Adds persisted session-source/thread-source helpers so automation-created threads can be stamped consistently.
  • Adds state/runtime helpers for thread metadata and spawn lineage that later dispatch code can reuse.
  • Adds state migrations for automation ownership/runtime scope metadata, numbered after current main migrations.

Verification

The rebased stack was checked with:

  • just bazel-lock-check
  • CODEX_SQLITE_HOME=/tmp/codex-automations-non-appserver-20260616-rebased just test -p codex-features -p codex-state -p codex-app-server-protocol -p codex-automation-extension
  • env -u CODEX_SQLITE_HOME just test -p codex-app-server suite::v2::automation

Documentation

No developers.openai.com documentation update is needed for this draft stack. The architecture draft lives in Notion while the API remains experimental and default-off.

@eternal-openai
eternal-openai force-pushed the codex/automations-01-groundwork branch from b0e1c77 to d04f773 Compare June 16, 2026 23:02
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