Skip to content

Agents and automation

This chapter follows work that leaves the single foreground model turn: built-in agents, custom agents, skills, subagents, background and multi-turn tasks, autopilot/no-ask-user modes, fleet orchestration, scheduled prompts, and command queues.

Read this chapter when the question is: how does the runtime delegate, parallelize, continue, or schedule work beyond one assistant response?

Source-anchor policy

This page is a chapter guide. Linked implementation pages carry concrete app.js anchors.

Semantic aliasMinified anchorScope
Agents/automation chapterN/A — navigation pageGroups task orchestration, built-in/custom agents, skills, autopilot/no-ask-user, fleet, and scheduled prompts.
Agent implementation pagesSee linked source-anchor tablesConcrete bundle anchors live in the destination pages.

Automation map

flowchart TD
Main[Main session/model] --> TaskTool[task tool]
TaskTool --> Registry[TaskRegistry]
Registry --> Builtins[Built-in agents]
Registry --> Custom[Custom agents]
Registry --> MCP[MCP tasks]
Custom --> Skills[Skills / AGENTS.md / allowed-tools]
Main --> Autopilot[Autopilot and no-ask-user]
Main --> Fleet[Fleet mode]
Main --> Schedules[Scheduled prompts]
Fleet --> Registry
Schedules --> Queue[Command queue]
Registry --> Results[Result handoff / lifecycle events]
click Registry "./agent-task-orchestration/" "Open agent task orchestration"
click Builtins "./built-in-agents/" "Open built-in agents"
click Custom "./custom-agents-and-skills-packaging/" "Open custom agents and skills"
click Autopilot "./autopilot-and-no-ask-user/" "Open autopilot"
click Fleet "./fleet-mode/" "Open fleet mode"
click Schedules "./scheduled-prompts-and-command-queue/" "Open scheduled prompts"

Primary reading order

OrderPageAgent/automation question answered
1Agent and task orchestrationHow do the task tool, TaskRegistry, main/subagent/custom-agent collaboration, hooks, MCP tasks, research, and fleet share lifecycle state?
2Built-in agentsWhich built-in agent types exist, how are YAML/runtime-defined prompts selected, and what slash-command entry points use them?
3Custom agents and skills packagingHow do AGENTS.md, SKILL.md, provided/remote/plugin agents, skill directories, invocation, allowed-tools, and enable/disable events work?
4Autopilot and no-ask-user flagsHow do --autopilot, --no-ask-user, continuation, task_complete, ask_user, and permission boundaries differ?
5Fleet mode implementationHow do /fleet, session.fleet.start, SQL todo coordination, dependencies, and parallel subagents interact?
6Scheduled prompts and command queueHow do /every, /after, ScheduleRegistry replay, queue integration, and ephemeral command dispatch work?

Handoffs

Created and maintained by Yingting Huang.