Repository navigation
fix(agent-core): queue cron prompts while goals are paused - #2440
ousamabenyounes wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 04009e4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afe730b64b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
afe730b to
54d0bda
Compare
|
Addressed the paused-goal print-mode hang in |
54d0bda to
01795e6
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Port the paused-goal cron guard to the v2 scheduler and keep print runs from waiting on fires the scheduler suppresses.
323eb83 to
04009e4
Compare
|
Rebased onto current Validation on the rebased checkout: the paused-goal cron regression fails on current |
Rebase update (2026-11-02)
Current
mainuses agent-core-v2. This branch is rebased at04009e458ea541f5e3f1045ffa9741ab6081ca0f; it retains the paused-goal cron guard, v2 print-runner guard, regression tests, docs, and changeset. The old agent-core files were removed upstream and are not part of the rebased diff. Current validation: RED on current main, then 95 cron and 35 v2 print tests GREEN, both package typechecks pass. GitHub CI pending. Earlier test counts below describe the pre-migration branch.Related Issue
Resolve #2390
Problem
Cron prompts that become due while a goal is paused currently start a full model turn. In a long-running session this repeatedly rereads the complete context even though autonomous goal work is explicitly stopped.
What changed
The cron scheduler now treats a paused goal as temporarily ineligible for delivery. It neither steers the agent nor advances the task cursor, so the prompt remains queued and becomes eligible on the next tick after
/goal resume.The regression test covers both halves of that contract: no steer, telemetry, or cursor advance while paused, followed by one delivery after the goal becomes active. The scheduled-task reference is updated in English and Chinese, and the CLI receives a patch changeset.
Test verification (RED → GREEN)
main:keeps a due cron queued while the goal is pausedfailed because one steer occurred instead of zero.1 failed, 20 passed).21/21; the complete cron area passes46/46.2/2covered (100% diff coverage).16,846passed,12files skipped by repository configuration,3expected failures,83skipped tests, and2todos. Typecheck, type-aware lint (0 errors), Sherif, changeset status, documentation build, andgit diff --checkalso pass.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Follow-up review fix
Addressed the print-mode hang reported in review:
kimi -pno longer keeps a ref’ed interval alive for future cron tasks while the goal is paused, matching the scheduler’s paused-delivery semantics.expected false to be truewhen only this CLI guard was absent.run-promptfile passes48/48; the repository suite passes16,846tests.