Skip to content

bug(scheduler): scheduler not initialized in ACP mode — tick loop and scheduler tool missing #1599

@bug-ops

Description

@bug-ops

Summary

The scheduler is completely absent from the ACP code path. When Zeph runs in ACP mode (IDE integration via Zed, Helix, VS Code), no scheduler tick loop is started and the scheduler tool is not registered in the agent's tool executor chain.

Root cause

build_acp_deps() in src/acp.rs constructs the shared ACP tool executor from:

  • FileExecutor
  • ShellExecutor + WebScrapeExecutor
  • McpToolExecutor
  • SearchCodeExecutor (optional)

It does not call bootstrap_scheduler(). Grep for scheduler in src/acp.rs returns zero results.

By contrast, runner.rs (CLI/TUI path) calls bootstrap_scheduler(agent, config, shutdown_rx, exp_deps) at line 878 and composes the returned SchedulerExecutor into the agent's tool executor.

Symptoms

  • Tasks created via the scheduler skill in an ACP session never fire
  • The scheduler tool is unavailable in ACP sessions (not in executor chain)
  • No cron tick loop runs — periodic tasks are silently dropped
  • One-shot deferred tasks are also never executed

Expected behavior

build_acp_deps() should call bootstrap_scheduler() and include the resulting SchedulerExecutor in the shared tool_executor. The tick loop should run as a background task for the lifetime of the ACP server process, shared across all sessions.

Fix sketch

  1. Call bootstrap_scheduler inside build_acp_deps() or in run_acp_server() after deps are built.
  2. Store the SchedulerExecutor in SharedAgentDeps.
  3. Compose SchedulerExecutor into the shared tool_executor.
  4. The tick loop is already spawned inside bootstrap_scheduler — no additional wiring needed.

Notes

bootstrap_scheduler currently takes an agent parameter to register the executor; may need refactoring to separate tick-loop startup from executor construction to fit the shared-deps model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcorezeph-core crate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions