> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yocxy2/claurst/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent & task tools

> Spawn sub-agents, manage background tasks, coordinate agent swarms, schedule cron jobs, and invoke skills.

Claurst exposes a rich set of tools for orchestrating work across multiple agents and across time. This page covers agent spawning, task management, team/swarm control, scheduling, and several utility tools.

***

## AgentTool

Spawn a sub-agent that runs its own agentic query loop to complete an independent task. The parent agent waits for the result (synchronous) or receives a task ID immediately (asynchronous/background).

**Tool name:** `Agent` (alias `Task`)

<Info>
  **When to use `AgentTool` vs `TaskCreateTool`**

  Use `AgentTool` when you want to **delegate a complete sub-task to another Claude instance** — it gets its own conversation, tool set, and model call budget.

  Use `TaskCreateTool` when you want to **track a piece of work in the shared task board** — a lightweight record with status, description, and dependency links, not a running agent.
</Info>

### Parameters

<ParamField path="description" type="string" required>
  3–5 word label for the task, shown in the UI.
</ParamField>

<ParamField path="prompt" type="string" required>
  Full task description given to the sub-agent as its initial user message.
</ParamField>

<ParamField path="tools" type="string[]">
  Subset of tool names to make available in the sub-agent. When omitted, the sub-agent inherits the parent's tool set (minus `AgentTool` itself, to prevent unbounded recursion).
</ParamField>

<ParamField path="system_prompt" type="string">
  Custom system prompt for the sub-agent. Overrides the default.
</ParamField>

<ParamField path="max_turns" type="integer">
  Maximum number of turns for the sub-agent (Rust implementation). Defaults to `MAX_TURNS_DEFAULT`.
</ParamField>

<ParamField path="model" type="string">
  Model alias to use for the sub-agent: `"sonnet"`, `"opus"`, or `"haiku"`. Defaults to the session model.
</ParamField>

<ParamField path="run_in_background" type="boolean">
  Launch the sub-agent as a background task and return a task ID immediately.
</ParamField>

<ParamField path="name" type="string">
  Named agent for messaging via `SendMessage`.
</ParamField>

<ParamField path="team_name" type="string">
  Associate this agent with a named team (swarm).
</ParamField>

<ParamField path="isolation" type="string">
  Isolation strategy: `"worktree"` (dedicated git worktree) or `"remote"` (remote session).
</ParamField>

### Return value

**Synchronous (run\_in\_background: false):**

<ResponseField name="status" type="string" required>
  `"completed"` on success.
</ResponseField>

<ResponseField name="result" type="string" required>
  Final assistant message from the sub-agent.
</ResponseField>

**Asynchronous (run\_in\_background: true):**

<ResponseField name="status" type="string" required>
  `"async_launched"`.
</ResponseField>

<ResponseField name="agentId" type="string" required>
  ID of the launched background agent; use with `TaskOutputTool` to retrieve results.
</ResponseField>

### Example

```json theme={null}
{
  "description": "Write unit tests",
  "prompt": "Write comprehensive unit tests for the functions in src/parser.rs. Cover edge cases including empty input, unicode, and error paths.",
  "tools": ["Read", "Write", "Bash"],
  "model": "sonnet"
}
```

***

## TaskCreateTool

Create a task record on the shared task board. Returns a task ID for later reference.

**Tool name:** `TaskCreate`\
**Gate:** Requires `isTodoV2Enabled()` (V2 task system).

### Parameters

<ParamField path="subject" type="string" required>
  Short title for the task.
</ParamField>

<ParamField path="description" type="string" required>
  Detailed description of what the task involves.
</ParamField>

<ParamField path="metadata" type="object">
  Arbitrary key-value metadata attached to the task.
</ParamField>

### Return value

<ResponseField name="task" type="object" required>
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique task ID.
    </ResponseField>

    <ResponseField name="subject" type="string">
      Task title.
    </ResponseField>
  </Expandable>
</ResponseField>

***

## TaskGetTool

Retrieve a task's current status, description, and dependency information.

**Tool name:** `TaskGet`\
**Gate:** Requires `isTodoV2Enabled()`.

### Parameters

<ParamField path="taskId" type="string" required>
  ID of the task to retrieve.
</ParamField>

### Return value

<ResponseField name="task" type="object">
  `null` if no task with that ID exists.

  <Expandable title="properties">
    <ResponseField name="id" type="string">Task ID.</ResponseField>
    <ResponseField name="subject" type="string">Task title.</ResponseField>
    <ResponseField name="description" type="string">Full description.</ResponseField>
    <ResponseField name="status" type="string">Current status: `pending`, `in_progress`, `completed`, `failed`, or `killed`.</ResponseField>
    <ResponseField name="blocks" type="string[]">Task IDs that this task blocks.</ResponseField>
    <ResponseField name="blockedBy" type="string[]">Task IDs that must complete before this task can run.</ResponseField>
  </Expandable>
</ResponseField>

***

## TaskUpdateTool

Update a task's status, subject, description, dependencies, or ownership.

**Tool name:** `TaskUpdate`\
**Gate:** Requires `isTodoV2Enabled()`.

### Parameters

<ParamField path="taskId" type="string" required>
  ID of the task to update.
</ParamField>

<ParamField path="status" type="string">
  New status. Use `"deleted"` to remove the task entirely. Valid values: `"pending"`, `"in_progress"`, `"completed"`, `"failed"`, `"killed"`, `"deleted"`.
</ParamField>

<ParamField path="subject" type="string">
  Updated title.
</ParamField>

<ParamField path="description" type="string">
  Updated description.
</ParamField>

<ParamField path="addBlocks" type="string[]">
  Task IDs that this task should now block.
</ParamField>

<ParamField path="addBlockedBy" type="string[]">
  Task IDs that now block this task.
</ParamField>

<ParamField path="owner" type="string">
  Assign ownership to an agent name.
</ParamField>

<ParamField path="metadata" type="object">
  Updated metadata.
</ParamField>

### Return value

<ResponseField name="success" type="boolean" required>Whether the update succeeded.</ResponseField>
<ResponseField name="taskId" type="string" required>ID of the updated task.</ResponseField>
<ResponseField name="updatedFields" type="string[]" required>List of field names that changed.</ResponseField>
<ResponseField name="statusChange" type="object">Present when status changed: `{ from, to }`.</ResponseField>
<ResponseField name="error" type="string">Error message if `success` is `false`.</ResponseField>

***

## TaskListTool

List all non-deleted tasks in the current session.

**Tool name:** `TaskList`\
**Gate:** Requires `isTodoV2Enabled()`.\
**Input:** No parameters required.

### Return value

<ResponseField name="tasks" type="object[]" required>
  <Expandable title="task properties">
    <ResponseField name="id" type="string">Task ID.</ResponseField>
    <ResponseField name="subject" type="string">Task title.</ResponseField>
    <ResponseField name="status" type="string">Current status.</ResponseField>
    <ResponseField name="owner" type="string">Assigned agent, if any.</ResponseField>
    <ResponseField name="blockedBy" type="string[]">IDs of blocking tasks that are not yet completed.</ResponseField>
  </Expandable>
</ResponseField>

***

## TaskStopTool

Stop a running background task (bash task or agent task).

**Tool name:** `TaskStop` (alias `KillShell`)

### Parameters

<ParamField path="task_id" type="string">
  ID of the task to stop. Returned when a task was launched with `run_in_background: true`.
</ParamField>

### Return value

<ResponseField name="message" type="string" required>Confirmation message.</ResponseField>
<ResponseField name="task_id" type="string" required>ID of the stopped task.</ResponseField>
<ResponseField name="task_type" type="string" required>Type of task that was stopped.</ResponseField>

### Notes

* The task must be in a non-terminal state (`pending` or `running`).
* In the Rust implementation, stopping a task sets its status to `Failed`.

***

## TaskOutputTool

Read the output of a background task, optionally blocking until it completes.

**Tool name:** `TaskOutput`

### Parameters

<ParamField path="task_id" type="string" required>
  ID of the task to read output from.
</ParamField>

<ParamField path="block" type="boolean" default="true">
  When `true`, wait until the task reaches a terminal state before returning.
</ParamField>

<ParamField path="timeout" type="number" default="30000">
  Maximum wait time in milliseconds when `block` is `true`. Range: 0–600 000 ms.
</ParamField>

### Return value

<ResponseField name="retrieval_status" type="string" required>
  `"success"`, `"timeout"`, or `"not_ready"`.
</ResponseField>

<ResponseField name="task" type="object">
  `null` when `retrieval_status` is not `"success"`.

  <Expandable title="properties">
    <ResponseField name="task_id" type="string">Task ID.</ResponseField>
    <ResponseField name="status" type="string">Terminal status: `completed`, `failed`, or `killed`.</ResponseField>
    <ResponseField name="description" type="string">Task description.</ResponseField>
    <ResponseField name="output" type="string">Captured output text.</ResponseField>
    <ResponseField name="exitCode" type="integer">Exit code for bash tasks.</ResponseField>
    <ResponseField name="result" type="string">Final message text for agent tasks.</ResponseField>
    <ResponseField name="error" type="string">Error message for failed tasks.</ResponseField>
  </Expandable>
</ResponseField>

***

## SendMessageTool

Send a message to a named agent, broadcast to all agents, or route via a Unix domain socket or bridge session.

**Tool name:** `SendMessage`\
**Gate:** Requires `isAgentSwarmsEnabled()`.

### Parameters

<ParamField path="to" type="string" required>
  Recipient address:

  * Agent name (in-process or mailbox)
  * `"*"` to broadcast to all agents
  * `"uds:<path>"` for a Unix domain socket
  * `"bridge:<session-id>"` for a cross-machine bridge (requires user consent)
</ParamField>

<ParamField path="message" type="string" required>
  Message text, or a structured message object. Structured types:

  * `{ type: "shutdown_request", reason?: string }`
  * `{ type: "shutdown_response", status: "ok" | "error", message?: string }`
  * `{ type: "plan_approval_response", approved: boolean, comment?: string, requestId: string }`
</ParamField>

<ParamField path="summary" type="string">
  Short summary shown in the UI activity feed.
</ParamField>

### Notes

* Bridge messages (`bridge:<session-id>`) always require explicit user approval regardless of permission mode.
* In the Rust implementation, messages are delivered to the `INBOX` in-memory store; broadcast (`*`) delivers to all current recipients.

***

## CronCreateTool

Schedule a prompt to run automatically on a cron schedule.

**Tool name:** `CronCreate`\
**Gate:** Requires `feature('KAIROS')` + `isKairosCronEnabled()`.

### Parameters

<ParamField path="cron" type="string" required>
  Standard 5-field cron expression in local time: `"M H DoM Mon DoW"` (e.g. `"0 9 * * 1-5"` for weekdays at 9 AM).
</ParamField>

<ParamField path="prompt" type="string" required>
  The prompt to enqueue at each scheduled fire time.
</ParamField>

<ParamField path="recurring" type="boolean" default="true">
  `true` — fire on every matching cron time (auto-expires after the configured max-age).\
  `false` — fire once then auto-delete.
</ParamField>

<ParamField path="durable" type="boolean" default="false">
  `true` — persist the job to `.claude/scheduled_tasks.json` so it survives process restarts.\
  `false` — in-memory only; job is lost when the session ends.
</ParamField>

### Return value

<ResponseField name="id" type="string" required>Job ID for use with `CronDelete` and `CronList`.</ResponseField>
<ResponseField name="humanSchedule" type="string" required>Human-readable schedule description (e.g. `"Every weekday at 09:00"`).</ResponseField>
<ResponseField name="recurring" type="boolean" required>Whether the job recurs.</ResponseField>
<ResponseField name="durable" type="boolean">Whether the job is durable.</ResponseField>

### Notes

* Maximum 50 concurrent scheduled jobs.
* The cron expression must match at least one date within the next year.
* Durable crons are not supported for teammate agents.

***

## CronListTool

List all scheduled cron jobs visible to the current agent.

**Tool name:** `CronList`\
**Input:** No parameters required.

### Return value

<ResponseField name="jobs" type="object[]" required>
  <Expandable title="job properties">
    <ResponseField name="id" type="string">Job ID.</ResponseField>
    <ResponseField name="cron" type="string">Cron expression.</ResponseField>
    <ResponseField name="humanSchedule" type="string">Human-readable schedule.</ResponseField>
    <ResponseField name="prompt" type="string">Prompt that fires on schedule.</ResponseField>
    <ResponseField name="recurring" type="boolean">Whether the job recurs.</ResponseField>
    <ResponseField name="durable" type="boolean">Whether the job persists across restarts.</ResponseField>
  </Expandable>
</ResponseField>

### Notes

* Teammate agents only see their own jobs. The team lead sees all jobs.

***

## CronDeleteTool

Cancel a scheduled cron job.

**Tool name:** `CronDelete`

### Parameters

<ParamField path="id" type="string" required>
  Job ID returned by `CronCreate`.
</ParamField>

### Return value

<ResponseField name="id" type="string" required>ID of the cancelled job.</ResponseField>

### Notes

* Teammate agents can only delete their own jobs.

***

## SkillTool

Invoke a user-defined skill — a prompt macro stored as a Markdown file in `.claude/commands/` or `~/.claude/commands/`.

**Tool name:** `Skill`

### Parameters

<ParamField path="skill" type="string" required>
  Name of the skill to invoke, or `"list"` to enumerate available skills. The name maps to a `<skill>.md` file in the commands directory.
</ParamField>

<ParamField path="arguments" type="string">
  Arguments to substitute for `$ARGUMENTS` in the skill template.
</ParamField>

### How skills work

1. Claurst resolves `<skill>.md` from the project commands directory first, then the user commands directory.
2. YAML frontmatter is stripped.
3. `$ARGUMENTS` placeholders are replaced with the provided arguments string.
4. The resulting text is returned as the tool result, and Claude uses it as its next instruction.

Skills are the primary way to package reusable prompt workflows without writing code.

***

## AskUserQuestionTool

Pause task execution and prompt you for a choice before continuing.

**Tool name:** `AskUserQuestion`

### Parameters

<ParamField path="questions" type="object[]" required>
  1–4 questions to ask. Each question has:

  <Expandable title="question properties">
    <ResponseField name="question" type="string" required>The question text.</ResponseField>
    <ResponseField name="header" type="string">Optional header displayed above the question.</ResponseField>

    <ResponseField name="options" type="object[]" required>
      2–4 answer options. Each option has `label`, `value`, and optional `description`.
    </ResponseField>

    <ResponseField name="multiSelect" type="boolean">Allow selecting multiple options.</ResponseField>
  </Expandable>
</ParamField>

### Return value

<ResponseField name="questions" type="object[]" required>The original questions.</ResponseField>
<ResponseField name="answers" type="object" required>Map of question → selected answer value(s).</ResponseField>

### Notes

* Not available when `--channels` flag is active (no terminal available).
* In non-interactive mode (Rust implementation with `non_interactive: true`), returns an error.

***

## ToolSearchTool

Discover available tools by keyword or exact name.

**Tool name:** `ToolSearch`

### Parameters

<ParamField path="query" type="string" required>
  Search query. Use `"select:<ToolName>"` for exact lookup (e.g. `"select:WebFetch"`), or plain keywords for fuzzy search (e.g. `"search files"`).
</ParamField>

<ParamField path="max_results" type="integer" default="5">
  Maximum number of tools to return.
</ParamField>

### Return value

<ResponseField name="matches" type="string[]" required>
  Tool names that matched the query.
</ResponseField>

<ResponseField name="query" type="string" required>
  The query that was run.
</ResponseField>

<ResponseField name="total_deferred_tools" type="integer" required>
  Total number of deferred tools available to search.
</ResponseField>

<ResponseField name="pending_mcp_servers" type="string[]">
  MCP servers still loading whose tools are not yet searchable.
</ResponseField>

### How scoring works

| Match type                  | Score                                  |
| --------------------------- | -------------------------------------- |
| `select:<name>` exact match | 100 (Rust) / exact lookup (TypeScript) |
| Exact tool name match       | 20 (Rust) / 10 (TypeScript)            |
| Name contains query         | 10 (Rust) / 5 (TypeScript)             |
| Description contains query  | 5 (Rust) / 2 (TypeScript)              |
| Keyword/hint match          | 8 (Rust) / 4 (TypeScript)              |

When a match is found via `select:<name>`, the full tool schema is injected into the conversation context as a `tool_reference` block.
