Repository navigation
feat(cli): add background process monitor and session cron scheduling - #14312
Merged
Merged
Conversation
iscekic
marked this pull request as draft
September 18, 2026 20:05
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summaries (3 snapshots, latest commit 840c968)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 840c968)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Previous review (commit 8bca44e)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (11 files)
Fix these issues in Kilo Cloud Previous review (commit 613f97b)Status: 8 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (17 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
added a commit
that referenced
this pull request
Sep 18, 2026
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
2 times, most recently
from
September 18, 2026 23:46
c566b5c to
8bca44e
Compare
iscekic
added a commit
that referenced
this pull request
Sep 18, 2026
iscekic
marked this pull request as ready for review
September 18, 2026 23:57
iscekic
marked this pull request as draft
September 19, 2026 00:08
iscekic
added a commit
that referenced
this pull request
Sep 19, 2026
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
from
September 19, 2026 00:58
8bca44e to
540b172
Compare
iscekic
added a commit
that referenced
this pull request
Sep 19, 2026
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
from
September 19, 2026 01:40
540b172 to
840c968
Compare
iscekic
marked this pull request as ready for review
September 19, 2026 02:00
iscekic
marked this pull request as draft
September 19, 2026 02:06
iscekic
added a commit
that referenced
this pull request
Sep 19, 2026
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
from
September 19, 2026 02:41
840c968 to
c7a4354
Compare
iscekic
added a commit
that referenced
this pull request
Sep 19, 2026
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
from
September 19, 2026 02:57
c7a4354 to
5fe6f23
Compare
iscekic
force-pushed
the
kwf/req-20260918-153037-33df
branch
from
September 19, 2026 04:48
5fe6f23 to
d739afe
Compare
iscekic
marked this pull request as ready for review
September 19, 2026 05:04
eshurakov
approved these changes
Sep 22, 2026
This was referenced Sep 23, 2026
iscekic
added a commit
that referenced
this pull request
Sep 23, 2026
# Make `/goal` and the timing tools one system Surface: cli. Verified against origin/main at 516e9ca, which contains PR #14312 (commit dfeeb48, "feat(cli): add background process monitor and session cron scheduling"); state that revision in the PR body. A goal must be able to wait on time, on a scheduled task, or on a background process and resume itself, and no scheduling tool may spin the goal loop. Today `/goal` and the timing tools are two subsystems that do not know each other exists, and the combination that most needs to work is broken. This item is the fix, plus the done-criteria that prove it. ## The timing surface Five tools plus one monitor, all one scheduler: - `schedule_wakeup` — `packages/opencode/src/kilocode/tool/schedule-wakeup.ts`, with the model-facing description in `tool/schedule-wakeup.txt`. One shot. - `cancel_wakeup` — `packages/opencode/src/kilocode/tool/cancel-wakeup.ts`, with `list` and `cancel` (`tool/cancel-wakeup.txt`). - `cron_create` — `packages/opencode/src/kilocode/tool/cron.ts` (`tool/cron-create.txt`). Takes exactly one of `cron` (a 5-field expression, smallest interval one minute), `when`, or `delay`, so it covers both recurring and one-shot. - `cron_list` — `packages/opencode/src/kilocode/tool/cron.ts` (`tool/cron-list.txt`). - `cron_delete` — `packages/opencode/src/kilocode/tool/cron.ts` (`tool/cron-delete.txt`). - `background_process` — the monitor added by the same PR, `packages/opencode/src/kilocode/tool/background-process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog for users
background_processgains amonitoraction that returns a command's output as it arrives, so a waiting agent reads progress instead of pollinglogs.monitorstops when the process exits, and reaching a cap leaves the process running and names its id forlogs,status, orstop.cron_createschedules a recurring task from a 5-field expression, or a one-shot from an absolute time or relative delay.cron_listshows each task's id, schedule, next fire time, and prompt;cron_deletecancels a task by id.--resume; the existingstart,list,status,logs,stop, andrestartactions keep working unchanged.Changelog for maintainers
cron_createnow rejects a schedule whose first fire lands past the seven-day expiry instead of arming and retaining it. Unchanged: a next window pastexpiresAtstill drops the task, records persist undercron/<sessionID>/<id>.json,adoptre-arms them,cancelSessiondeletes them, and they never hold Keep Awake (10 per session, 7-day TTL).closeafter stdio drains, somonitorkeeps trailing output and the exit path cannot drop it. Unchanged: the 200 ms poll, streamed output throughctx.metadata, thectx.abortrace, the sandbox block onstart/monitor/restart, and theinherit/persistentrejection.Fire.runkeeps itskindoption (wakeup|cron) and the[scheduled cron task]label, and the next window is still persisted before the resume runs — review this fire/re-arm path first for crash safety and missed-window handling.validate/next/jitter/isExpressionmodule re-exported by the wakeup schema;Wakeup.ServicekeepscronCreate/cronList/cronCancelwithCronInfo/CronInputand theInvalidSchedule/TooManyCronerrors.next()/jitter()under test.reenterhook, covering the in-flight fire guard and an overdue fire that must not stall.adoptdoes not fire early, then waits for the fire.monitoraction and the session cron tools for release notes.KiloToolRegistrystill wires the three cron tools in the node graph and exposes them only to the cli/vscode clients.E2E proof — log excerpts
tsgotypecheck, andoxlinton the changed files; one background-process shutdown check passed on retry after a flake.test:cirun (274 test files) hit the 2400 s gate wall and is recorded as advisory, not a regression; it is not counted as a pass.pyte/Pillow), so no screen captures exist and all proof is logs.closefix, so its failure transcript no longer proves the repaired stop path — the background-process monitor suite covers it.background_processactions; they were not re-collected.Owner request
E2E proof — log excerpts
E2E proof — log excerpts