Skip to content

fix(scheduler): initialize scheduler in ACP mode#1602

Merged
bug-ops merged 1 commit intomainfrom
scheduler-acp
Mar 13, 2026
Merged

fix(scheduler): initialize scheduler in ACP mode#1602
bug-ops merged 1 commit intomainfrom
scheduler-acp

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 13, 2026

Summary

  • Wire bootstrap_scheduler into the ACP code path so that the scheduler tick loop starts and the scheduler tool is available in ACP sessions (Zed, Helix, VS Code)
  • Extract init_scheduler() from bootstrap_scheduler to separate tick-loop/executor startup from Agent wiring; runner.rs is unchanged
  • Add DynSchedulerExecutor wrapper for Arc-based sharing across ACP sessions
  • Distribute per-session scheduler receivers via existing broadcast_to_mpsc pattern (same as skill/config reload)

Closes #1599

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace --features full -- -D warnings passes (0 warnings)
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5136 passed
  • ACP session: scheduler tool present in tool list
  • ACP session: periodic task created via scheduler skill fires on schedule

Wire bootstrap_scheduler into the ACP code path so that the tick loop
starts and the scheduler tool is available in ACP sessions (Zed, Helix,
VS Code).

- Extract init_scheduler() from bootstrap_scheduler in src/scheduler.rs:
  constructs JobStore, Scheduler, tick loop, and SchedulerExecutor without
  touching Agent<C>; bootstrap_scheduler remains a thin wrapper for runner.rs.
- Add DynSchedulerExecutor(pub(crate) Arc<SchedulerExecutor>) in
  src/scheduler_executor.rs to allow Arc-wrapped sharing across ACP sessions.
- Extend SharedAgentDeps with scheduler_executor / scheduler_update_tx /
  scheduler_custom_tx fields (all cfg(feature = "scheduler")).
- Call init_scheduler() in build_acp_deps(); per-session receivers are
  distributed via broadcast_to_mpsc, matching the skill/config-reload pattern.
- spawn_acp_agent() wires DynSchedulerExecutor into the tool executor chain
  and applies update/custom receivers to each session's agent.

Closes #1599
@github-actions github-actions Bot added bug Something isn't working size/L Large PR (201-500 lines) documentation Improvements or additions to documentation and removed bug Something isn't working size/L Large PR (201-500 lines) labels Mar 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 13, 2026 12:58
@bug-ops bug-ops merged commit 00036f3 into main Mar 13, 2026
15 checks passed
@bug-ops bug-ops deleted the scheduler-acp branch March 13, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant