Skip to content

automations: defer heartbeats for cooldown - #28620

Closed
eternal-openai wants to merge 1 commit into
codex/automations-11-dispatch-coveragefrom
codex/automations-12-heartbeat-cooldown
Closed

eternal-openai wants to merge 1 commit into
codex/automations-11-dispatch-coveragefrom
codex/automations-12-heartbeat-cooldown

Conversation

@eternal-openai

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

Copy link
Copy Markdown
Contributor

Stack

  1. #28609 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. This PR: automations: defer heartbeats for cooldown

Why

Heartbeat prompts should not fire immediately after a user or agent has already interacted with the target thread. Deferring based on recent thread activity preserves the old heartbeat cooldown semantics while keeping scheduled dispatch at-least-once.

What Changed

  • Adds heartbeat cooldown calculation based on max(last_run_at, thread.updated_at) + interval.
  • Defers scheduled heartbeat dispatch when the target is still inside its cooldown window.
  • Leaves last_run_at unchanged for deferred heartbeats.
  • Adds state tests for scheduled heartbeat cooldown deferral.

Verification

  • codex-state heartbeat cooldown tests passed in the focused non-app-server run.

@eternal-openai
eternal-openai force-pushed the codex/automations-12-heartbeat-cooldown branch from 25d953f to df52f88 Compare June 17, 2026 00:14
@eternal-openai
eternal-openai force-pushed the codex/automations-11-dispatch-coverage branch from d10628f to 6631536 Compare June 17, 2026 00:14
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

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