Task Tools Plugin
The Task Tools plugin lets the agent (or you, through it) create, inspect, and manage one-off scheduled agent runs (run_at). Recurring or event-fired work is a goal — see the Goals plugin (setup_goal; a single-worker goal is the lightweight form). Each run fires as a fresh conversation seeded with the stored prompt; there is no context carry-over between runs.
This plugin is the agent-facing surface only. The runs themselves — the run history, the job handler and the maintenance sweep — belong to the Task Runtime plugin, which it depends on.
Migrating a legacy scheduler_tools entry
Current builds do not ship scheduler_tools. If an inherited config still
lists it, remove the legacy entry from the layer that defines it; changing its
module prefix does not restore it. Use codumentor.plugins.task_tools for
one-off scheduling tools and codumentor.plugins.task_runtime for execution
(without a src segment). If those plugins are already configured, do not add
copies. Use Goals for recurring or event-fired work.
Configuration
plugins:
- module: codumentor.plugins.task_tools
class: TaskToolsPlugin
priority: 10
args:
enabled: true
default_timezone: UTC
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable or disable the plugin. |
allow_cron | bool | — | Deprecated, ignored. create_task is one-shot only, so there is nothing to allow; a configured value is accepted with a warning. Will be removed in the next release — drop it from your config. |
default_timezone | string | "UTC" | IANA timezone recorded with a task when create_task is given none (run_at itself is epoch seconds, UTC). |
target_agents | string | "main" | Which agents get the task engine tools: "main", "subagent", or "all". Default keeps scheduling off subagents (their tool calls have no human reading them). A scheduled run itself is a main agent, so it can still manage tasks. |
One switch this plugin reads but does not own: tasks.allow_agent_created
(default true), in the server's tasks: block rather than here, because it is
a statement about the task engine's authorization boundary rather than about
which tools this plugin ships. false makes create_task refuse — see
Admin Configuration Reference.
Tools
| Tool | Description |
|---|---|
create_task | Create a one-off run: prompt and run_at (required), plus optional title, description, timezone, access_profile (the profile the unattended run executes under), and per-run limits timeout_seconds (wall clock, max 6h) and token_budget (tokens, minimum 10000). Returns a schedule_id. Passing cron, on, when, scope, mode or debounce_seconds is refused with invalid_args pointing to setup_goal. |
list_tasks | List the caller's tasks (optional status filter) |
get_task | Full detail for one task, including last-run state |
update_task | Change run_at, timezone, title, prompt, or the per-run limits timeout_seconds / token_budget. Passing null for a limit removes the task's own value, so the default applies again (the operator's token budget, the job queue's timeout). cron is accepted only on a task that is already recurring (a legacy row from before goals took over recurring work); a one-off cannot be turned into a recurring task. |
pause_task / resume_task | Pause or resume a task |
snooze_task | Postpone the next fire to a given time |
cancel_task | Permanently cancel a task |
list_task_runs | List prior runs of a task (most recent first), with status / error_kind, timings and tokens (input, cached, cache-write, output, total, cost_usd — null = unknown — and the run's effective token_budget, null = unlimited) |
get_task_run_output | Fetch a run's prompt, final answer, and turn summary |
list_events | Read the trigger event ledger — "did the webhook arrive?", "why did that task run?" |
Notes
- You can only see and modify your own tasks
list_eventsis the exception: an event is an instance-level fact (a push arrived, an ingest finished), not something with an owner, so the ledger is not scoped per user. Raw webhook bodies are never returned by it. - A card in the conversation shows when a scheduled run starts and finishes.
- Per-task
timeout_secondsoverrides the job queue's default timeout. - Per-task
token_budgetcaps one run's agent tokens — every token sent to or received from the model, cached prompt tokens included, subagents and external agents included; auxiliary calls (auto title, summaries, memory recall, judges, compaction) are not counted. Without one, the operator'stasks.default_run_token_budget(ordefault_webhook_run_token_budgetfor webhook-fired runs) applies, andtasks.max_run_token_budgetcaps any value. The run is checked at the top of each agent-loop iteration, so it can overshoot by up to one iteration; the agent is told to wrap up at 80 %. A run that spends its budget endsfailedwitherror_kind: token_budgetand counts toward the task's auto-disable like a timeout. A run whose model the loop detector stops (it kept repeating the same step) likewise endsfailed, witherror_kind: loop; so does a run whose turn ends on a reply nothing can use (error_kind: unusable_reply). See Admin Configuration Reference → Per-run token budgets. - The finished run card shows the run's tokens (
Tokens: 84.2k (in 80.1k, cached 61k, out 4.1k)), its budget and % used when it had one, and its cost —unknownfor a model without a price, never$0. - A run whose turn waits on an approval stays
runningand keeps its budget when resumed; past the Task Runtime'sparked_run_ttl_secondsit endsfailed(stale). This bookkeeping is in memory: after a server restart such a run endsfailed(stale) and its turn is not continued. list_event_typesandtest_triggermoved to the Goals plugin, since event-fired work is now a goal worker.- Recurring (
cron) and event-fired tasks created before this change keep running and stay manageable here (list, pause, snooze, update, cancel, run history). An admin converts them into single-worker goals withcodumentor tasks migrate-to-goals— see Task engine.