fix(agent-core): queue cron prompts while goals are paused - #2440
fix(agent-core): queue cron prompts while goals are paused#2440ousamabenyounes wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 54d0bda 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 |
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.