Skip to content

fix(agents): give every ControlHub mode the Cron tool - #2215

Merged
bobleer merged 1 commit into
mainfrom
bob/cron-missing-from-modes
Aug 11, 2026
Merged

fix(agents): give every ControlHub mode the Cron tool#2215
bobleer merged 1 commit into
mainfrom
bob/cron-missing-from-modes

Conversation

@bobleer

@bobleer bobleer commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

Asked to sweep a set of channels every 30 minutes, a Cowork-mode agent answered:

我的工具列表里没有 cron 定时任务工具可用(可用的是 search/wait/浏览器等)。我会用 wait 实现 30 分钟间隔

It was telling the truth. Cron appeared in exactly one mode's default_tools — Claw — and nowhere else:

Mode ControlHub Cron (before)
Claw
Cowork
Team
DeepResearch
agentic / debug / multitask / plan (shared_coding_mode_tools)

Deferred exposure is not the cause — deferred tools are advertised to the model by name in the <deferred_tools> listing, so the agent would have seen Cron had it been in the list. It simply was not.

This also left #2212 pointing at a tool that often is not there: ControlHub's wait documentation now says to schedule repeating work with the Cron tool instead of holding the turn open, and ControlHub ships in every mode in that table. The agent got told to use a tool it did not have, and quietly fell back to chaining hour-long waits — the exact pattern that guidance exists to prevent.

Changes

  • Add Cron to every mode that carries ControlHub — Cowork, Team, DeepResearch, and shared_coding_mode_tools() (agentic / debug / multitask / plan). Claw already had it.
  • Add an invariant test over the built-in modes: a mode offering ControlHub must also offer Cron. This is not decoration — the first pass of this fix missed the shared coding baseline, and the test is what caught it.
  • Say what to do when Cron really is absent (a custom tool manifest can still omit it) instead of leaving a chain of long wait calls as the unspoken fallback.

Scope note

This widens what the agent can propose, not what it can do unattended. CronTool::is_readonly() is false and it does not override permission_intents, so every add / update / remove / run emits a custom_tool intent and goes through the normal permission gate. Cron also stays denied in connection-scoped transient sessions, which this PR does not touch.

Testing

cargo test -p bitfun-core --lib — 1948 passed, 0 failed.

cargo fmt --check and cargo clippy unchanged from base (7 pre-existing fmt diffs, 11 pre-existing MutexGuard held across await findings, none in files this PR touches).

Asked to sweep a set of channels every 30 minutes, a Cowork-mode agent
replied that it had no cron tool and fell back to chaining long `wait`
calls. It was telling the truth: `Cron` was in Claw's tool list and
nowhere else, so in Cowork, Team, DeepResearch, and the four shared
coding modes the agent could not see it at all. Deferred exposure is not
the cause — deferred tools are advertised by name — the tool simply was
not in those modes' `default_tools`.

ControlHub's `wait` documentation now tells the agent to schedule
repeating work with Cron instead of holding the turn open, and ControlHub
ships in all of those modes, so the guidance pointed at a tool the agent
did not have.

- Add `Cron` to Cowork, Team, DeepResearch, and `shared_coding_mode_tools`
  (agentic / debug / multitask / plan), so it is available everywhere
  ControlHub is.
- Cover the pairing with an invariant test over the built-in modes; it
  caught the shared coding baseline, which the first pass had missed.
- Say in ControlHub's description what to do if Cron is genuinely absent,
  rather than leaving a chain of long waits as the silent fallback.

Scheduling stays behind the normal permission gate — Cron is not
read-only and emits a `custom_tool` intent — so this widens what the
agent can propose, not what it can do unattended.
@bobleer
bobleer merged commit f8c5402 into main Aug 11, 2026
7 checks passed
@bobleer
bobleer deleted the bob/cron-missing-from-modes branch August 11, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant