Skip to content

Add durable goals with scheduled and event-driven execution - #19

Draft
josephschorr wants to merge 14 commits into
slot-pinningfrom
feat/goal-execution
Draft

josephschorr wants to merge 14 commits into
slot-pinningfrom
feat/goal-execution

Conversation

@josephschorr

Copy link
Copy Markdown
Member

Motivation

Agents currently perform work within individual sessions. Users also need to describe an outcome once, retain it across sessions, and have approved work resume when it is due or when relevant information changes.

Summary of changes

Adds opt-in, private goals that persist across sessions, with scheduled and event-driven execution. Goals can run once or on a finite recurring schedule, respect quiet hours, and react to changes from accessible information sources.

Execution stays within reviewed limits. Users can approve each run or explicitly authorize unattended private reporting for a defined period. Agents can also request permission to suggest new monitoring goals; each suggestion requires its own approval.

Results, delivery evidence, approvals, and cost estimates remain available after a run ends. Goal-created sessions alert the user, show a concise summary, and keep their exact instructions inspectable. Refreshing a conversation preserves its recorded approval state.

How it is used

Enable goals for an agent, then create and manage them through conversation or the CLI. Review the proposed schedule or event conditions, recipient, duration, and execution limits before approving. Pause, update, or cancel the goal as needs change, and inspect its retained run history to see what happened.

Scheduled goals can publish private observations that other goals use to react to changes. Execution is limited to approved private reporting and notifications.

Review structure

The commit series separates durable goal management, bounded execution, retained conversation state, scheduling, event handling, and recovery. Generated outputs and regression coverage accompany the changes they support.

This is a draft stacked on #16 so its diff contains only the goals feature and supporting changes.

Validation

  • mage test:unit
  • mage test:integration
  • mage test:e2e

Browser tests and both TypeScript projects passed. Storage-dependent browser tests were rerun with the local Node 26 compatibility setting.

API schemas, install manifests, and CLI/CRD references were regenerated. Documentation checks, tests, type checks, production build, and search indexing passed. The documentation build used webpack with the installed local dependencies.

Introduce user- and class-scoped goals with revisions, idempotent mutations,
source dependencies and retained audit events. Add management tools, CLI
commands and HTTP endpoints backed by durable relational stores.

Keep desired outcomes separate from permission to execute work, and check
current ownership and source access on reads and changes.
Require exact consent to a pinned agent class, private destination, launch
window and execution limits. Dispatch through a durable occurrence ledger
with worker leases, fencing and deterministic session identities.

Recheck consent and account authority at activation, constrain delegated
execution, and expose only the operations allowed for the bounded run.
Record run proposals separately from delivery receipts and terminal
outcomes so retained history does not claim effects that were not verified.
Reconcile uncertain private deliveries through a durable idempotent receiver.

Add generic asynchronous-session summaries with inspectable instructions,
and replay interaction cards, decisions and plan snapshots consistently
after refresh across conversation transports.
Accumulate provider-reported tool spend alongside model usage without
double-counting buckets. Retain per-run estimates after session cleanup
and distinguish final accounting from incomplete lower bounds.
Select a ready running service pod when establishing local connections,
ignoring retained terminal pods and terminating rollout replicas instead
of forwarding to the first listed pod. Cover that selection in CLI tests.
Prepare exact reminder consent before freezing an action plan and decide
it together with the phase approval. Retain the consent and its outcome
for replay and reject preparation in bounded or delegated sessions.

Present compact consent details, alert on goal-created browser sessions,
and explain how to begin when no agent is installed.
Introduce a reusable scheduled-session model for once, interval, daily
and weekly runs. Resolve finite occurrence windows in an explicit timezone
and defer quiet-hour runs while coalescing collisions.

Retain schedule identity through retries, skip missed windows and recheck
goal revision, consent and capacity before each launch.
Separate launch consent from action approval. Support explicit standing
consent for unattended private delivery within reviewed operations,
recipient, schedule and execution bounds.

Derive approval only for the exact frozen plan and phase under live
authority; ordinary sessions and manual consent retain human approval.
Add a reusable private observation ledger with source incarnation pins,
dependencies, witnesses and publisher checkpoints. Register source adapters
and validate ingress independently of agent-provided content.

Persist finite predicates, admission decisions and launch requests so
event redelivery and worker turnover cannot create duplicate sessions.
Connect finite event subscriptions to bounded goal occurrences. Recheck
source access and execution consent before materializing an event launch.

Allow separately authorized discovery policies to propose private monitors
with retained evidence, expiry and question limits. Require exact consent
for each proposed monitor before creating its goal and watch.
Bind consent and audit recovery to verified actors, revisions and signed
records. Enforce temporal, operation and destination bounds through
revocation, cleanup and worker recovery.

Keep event scans fair under failing work and bound pending admissions.
Serialize approval timeout decisions and restore the original reviewed
card and recorded outcome instead of synthesizing a new approval.
Return server time, conservative class-capped bounds and actionable
validation errors during goal setup. Discover configured event feeds
through registered source adapters with current access checks.

Exercise scheduled and event-driven workflows through the full local
runner, including private delivery, standing approval and recovery.
Allow explicitly authorized runs to attach scoped observations to their
retained results. Publish through an idempotent outbox with source
dependencies, live authority checks and audited permanent rejection.

Expose stable goal-produced feeds for downstream event watches. Release
execution capacity after verified runner termination while retaining the
conversation for inspection, so dependent runs can proceed promptly.
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openagentprimitives Ready Ready Preview Oct 5, 2026 4:52pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 05242e4a Deployed Oct 5, 2026 by vercel[bot]
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