Repository navigation
feat(cli): add scheduled wakeup and cancel tools - #14094
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit ad942f9)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ad942f9)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
All eight findings from the previous review (paused-session drop, adopt/fire duplicate, cap accounting and atomicity, storage-backed Files Reviewed (11 files)
Fix these issues in Kilo Cloud Previous review (commit e9d14e4)Status: 8 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (20 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
e9d14e4 to
ad942f9
Compare
ad942f9 to
8438f8d
Compare
Changelog for users
delayunder 10 seconds is raised to 10 seconds, and a time beyond 7 days is pulled back to 7 days; an absolutewhenfires as given and a past time is rejected.[scheduled wakeup], with a note that no user is present.Changelog for maintainers
packages/opencode/src/kilocode/wakeup/resume.ts:37— accepted: resume reads the session's paused flag and logs error-levelwakeup could not resume sessionwith the id, session, directory, andreason=session is pausedinstead of letting the prompt path drop the wake; a missing session or directory takes the same error log. The wake turn is a synthetic text part that begins[scheduled wakeup], carries the scheduled prompt and a no-user note with the wake id and due time, and an idle session resumes through the session prompt path.packages/opencode/src/kilocode/wakeup/index.ts:81— accepted: a fire deletes its persisted file and marks the id as firing before resuming, soadoptcannot re-fire a turn that is already running; bootstrap callsadopt(directory), which fires overdue wakeups immediately and arms timers for the rest.packages/opencode/src/kilocode/wakeup/index.ts:105— accepted: the cap counts only parseable files and runs the count and write as one semaphore-guarded section, so corrupt files cannot hold slots and parallel schedules cannot pass the cap; two wakeups due at the same instant both fire.packages/opencode/src/kilocode/wakeup/index.ts:124— accepted:listmerges the in-memory map with the persistedwakeup/sessionID/idstore, so it sees wakeups saved before a restart; each record carriessessionIDanddirectory, so the guarantee reaches a running process and the next CLI start in that directory, not a separate daemon.packages/opencode/src/kilocode/tool/cancel-wakeup.ts:79— accepted:canceltakes the caller's session id and reports an id owned by another session as not found; both tools ship to CLI and VS Code clients, and a changeset marks the CLI release as minor.packages/opencode/src/kilocode/wakeup/schema.ts:8— accepted: onlydelayis raised to the 10-second minimum; an absolutewhenis honored as given, and the comment and changelog now say so. Exactly one ofwhen/delay; an explicit offset is absolute, otherwise the host timezone applies; a past time is rejected and a time past 7 days is pulled back.packages/opencode/src/kilocode/tool/cancel-wakeup.txt:4— accepted: the description now says list shows the reason, or the scheduled prompt when no reason was given.packages/opencode/src/kilocode/wakeup/resume.ts:53— accepted: aninPlaceflag keeps the deadlock-avoiding in-place branch only on the overdue-adopt path, so a timer fire re-resolves the instance throughprovide; a fire while the model is running forks a detached prompt instead of blocking the timer. Check the resume path first, then the clamp math; the resume integration test needs a promise-facade guard allowlist entry because a static layer dependency between the wakeup node and the session prompt node is impossible; an orphaned ghostty-web patch with nopatchedDependenciesentry was removed.E2E proof — log excerpts
Collected 2026-09-13. These live CLI captures replace the earlier schedule/list/cancel, clamp, cap, and validation transcript claims.
Limitation: process 1 scheduled at 2026-09-13T21:29:22Z and the listing process started at 2026-09-13T21:29:34Z, so e1's restart/list/cancel was observed across CLI starts in the same directory; e3 depends on the abort leaving the session paused.
Owner request