Native Runtime: codepilot_schedule_task and related builtin tools not available in any session
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)
当前状态
感谢反馈,保留跟进。需要先确认复现条件:使用的运行时引擎(Native / Codex / Claude Code)、具体哪个会话场景下 codepilot_schedule_task 等内置工具不可用。下一步排查 Native runtime 下 builtin tools 的注入链路。
如能补充:引擎类型、是否新建会话、相关日志,有助于定位。