Repository navigation
Conversation
schedule_create with silentWhenIdle=true and no binding used to start a fresh task on every fire, filling the sidebar with empty no-change conversations. When the caller leaves persistentSession unset and binds no session, the tool layer now defaults it to true. Explicit false, bound targets, reminders and script schedules are unchanged; engine and UI defaults are unchanged. Signed-off-by: elfcv <cnxpfcv@gmail.com>
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. |
[Medium impact] The change affects a narrow path for creating scheduled Agent checks. 合并前应修复本机模型选择与新增持续会话默认值的冲突,避免有效的检查任务无法创建。 Findings
Fix with agent prompt### Issue 1
packages/lizi-mcps/src/scheduler/create.ts:228-234
调用方传入 `silentWhenIdle: true`、`modelAgentDeviceId: ''`,但省略 `persistentSession` 和 `modelAgentKind` 时,这里会自动开启持续会话。此前这种未绑定任务允许使用 `agentKind` 和本机模型;现在引擎却要求同时提供 `modelAgentKind` 和 `model`,即使已经提供 `model` 也会拒绝创建。
补默认值时需要同时处理这类本机模型选择,避免原本有效的请求报错,并添加对应的 MCP 回归用例。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
|
…use-session Signed-off-by: elfcv <cnxpfcv@gmail.com> # Conflicts: # docs/product-rules/bot-routines.md
A persistent session with modelAgentDeviceId='' must also carry an explicit Harness and model (engine validation). Do not default persistentSession in that case, so such check requests keep working. Signed-off-by: elfcv <cnxpfcv@gmail.com>
|
维护者确认请求:本 PR 修改规则文档 |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
这次改了什么
摘要
Agent 用
schedule_create新建检查类定时任务(silentWhenIdle=true)时,原来默认每次触发都新建一个任务,没有变化的检查也会在侧栏刷出一串空对话。现在如果调用方既没绑定会话,也没设persistentSession,工具层会把它补成持续会话,后续检查都复用同一个任务。参考:DeepSeek Harness 的 Schedule 在创建时省略目标就默认
new_once(第一次投递时新建,之后一直复用),见其docs/subsystems/schedule.zh.md「投递目标」一节。变更类型
fix缺陷修复范围
packages/lizi-mcps/src/scheduler/create.ts里的默认补全和工具说明;一条 MCP 入口测试;在docs/product-rules/bot-routines.md「检查前置与静默输出」一节补一句。Scheduler.create的默认值、Desktop / Mobile 表单、schedule_update、伙伴例行任务(例行任务本身已默认sessionMode=persistent)、已有的定时任务(不迁移)。persistentSession=false、绑定已有任务(targetSessionId/bindToCurrentSession)、提醒类(silentWhenIdle省略或为 false)、仅脚本任务,行为都不变。packages/lizi-mcps/src/scheduler/create.ts、cindy_schedulerMcpServer.test.ts、docs/product-rules/bot-routines.md有重叠改动,建议先合本 PR、再合 fix(scheduler): skip the model when a check has no change signal #8285,后合的那个由作者 rebase 解冲突。fix(scheduler): 派发前撤回的提示直接删除,并定期清掉历史软隐藏 #7828 只改 runner 的撤回路径,与本 PR 无交集。UI 变化
不涉及。
怎么验证的
自动验证
测试价值(engineering-conventions §3.2):通过真实的
call_tool(schedule_create)入口创建,读回持久化后的persistentSession。最小失败输入是{ silentWhenIdle: true }。现有用例没有覆盖检查类的会话默认值;同时锁住显式 false、绑定任务和提醒类不受影响。用例并入已有文件,tier 为 unit。手工验证
不涉及(没有启动 Desktop,也没有创建真实定时任务)。
未执行的验证
pnpm test:unit:本 PR 只改工具层默认值,runner 走的是已有的persistentSession路径。风险
风险分类
schedule_create的 description)。影响与回滚
cindy_scheduler.schedule_create新建、且silentWhenIdle=true、未绑定会话、未设persistentSession的任务。授权分类不变:未绑定的 agent 任务原本就算作启动独立 Agent。persistentSession,用户可以在表单里改成「每次新建」。提交前检查