Native Runtime: codepilot_schedule_task and related builtin tools not available in any session
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- electron, nextjs, typescript
调研方向
Start in src/lib/builtin-tools/index.ts and inspect the notification module and its imports, especially the require('./notification') path and notification.ts. Reproduce the missing tools in a Native Runtime chat, then check why the notification group is not registered. Done means the listed notification tools are available in eligible sessions and the module-loading failure is no longer silent.
由索引模型根据 Issue 内容生成。
描述
Description
In CodePilot's Native Runtime, the scheduled task / notification builtin tools (codepilot_schedule_task, codepilot_list_tasks, codepilot_cancel_task, codepilot_notify, codepilot_hatch_buddy) are not available in any chat session — neither in assistant mode nor in any other conversation.
The model prompt lists the harness extensions, and NotificationMcp (Native Runtime) is shown as a plugin (not executable), while all other CodePilot extensions (e.g. DashboardMcp, SessionSearchMcp, CliTools, MemorySearch) correctly show as executable.
Expected Behavior
Per src/lib/builtin-tools/index.ts, getToolGroups() registers codepilot-notify with condition: 'always', so these tools should be available in every non-heartbeat, non-plan session:
codepilot_notify— send notificationcodepilot_schedule_task— create scheduled task (cron / interval / once)codepilot_list_tasks— list scheduled taskscodepilot_cancel_task— cancel a taskcodepilot_hatch_buddy— hatch buddy
Actual Behavior
The model's tool list does not include any of the above. The harness extension list shows:
- NotificationMcp (Native Runtime) (native plugin) — Detected in builtin-tools. Not executable...
while other Native Runtime tools correctly show:
- DashboardMcp (Native Runtime) (native plugin) — Detected in builtin-tools. Executable in current Runtime
Steps to Reproduce
- Open CodePilot desktop app
- Start any chat session (assistant mode or normal)
- Ask the model to create a scheduled task, e.g. "帮我创建一个10分钟间隔的心跳任务"
- The model cannot call any schedule/notify tool
Root Cause Investigation
From the source code (src/lib/builtin-tools/index.ts):
try {
const { createNotificationTools, NOTIFICATION_SYSTEM_PROMPT } = require('./notification');
groups.push({
name: 'codepilot-notify',
systemPrompt: NOTIFICATION_SYSTEM_PROMPT,
condition: 'always',
tools: createNotificationTools({
sessionId: options.sessionId,
workingDirectory: options.workspacePath,
}),
});
} catch { /* notification module not available */ }
The catch block is silent. It appears the require('./notification') is failing silently, so the group never gets registered.
Other tools with the same pattern (e.g. ./dashboard, ./session-search) work fine, so the issue is likely specific to the notification module — possibly a missing dependency (e.g. @/lib/notification-manager) that throws during require().
Suggested Fix
- Add logging to the
catchblock so the failure is visible in dev/console:catch (err) { console.warn('[builtin-tools] Failed to load notification module:', err); } - Check if
@/lib/notification-manageror any import innotification.tshas a missing dependency or circular import that causes silent failure.
Environment
- CodePilot version: latest (as of 2026-06-12)
- OS: macOS (Darwin, arm64)
- Runtime: Native Runtime (CodePilot desktop client)
- 主要语言
- TypeScript
- 星标
- 6.5k
- 派生
- 697
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
op7418/CodePilot 的其他 Issue
-
bug P0-crash-or-interrupt
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug P0-crash-or-interrupt
难度 4/5 3-5 天 新手友好度 48/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
backnotprop/plannotator#2914 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/vscode-containers#655 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · 1 条评论 ·