Tools and permissions
The model selects from advertised tools. The runtime owns registration, validation, execution, and the results returned to the model.
One capability boundary
Each handler supplies its specification. The finalized router advertises and dispatches the same capabilities; a model-supplied name cannot enable an unregistered tool. Calls execute sequentially after response validation.
Most calls use JSON function arguments. apply_patch carries raw patch text.
The router preserves their payload kinds and call IDs in retained history.
Permission modes
Main and workers retain configured permissions. Role guidance directs how they coordinate. Child agents inherit effective permissions and model settings; Echo makes no model requests and executes no tools.
File tools enforce workspace path boundaries. Full mode executes unsandboxed host shell commands without per-call approval. A failed tool can leave effects already applied, so errors and prior results remain visible to later steps.
Coordination tools manage conversations and delivery. create_thread starts an
independent root with fresh history in the current project, inheriting effective
provider, model, and tool settings. It returns IDs while the initial prompt runs
in the background; failures remain visible in the new thread. Use spawn_agent
for delegated children. Main may create workers as part of project delegation;
other threads require an explicit user request for a separate chat. Hosted web search is
executed by the provider inside the model request.
MCP servers contribute external tools and resources to the same registry and router. Their enablement and tool filters authorize those calls independently of the local permission mode.
Implementation: tools/.