Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tools reference

Koda exposes these tools to the model. In Safe trust mode you’ll be prompted before each mutating call. In Auto mode, mutating ops within the project sandbox auto-approve, but destructive ops still prompt. See Trust modes for the canonical matrix.

ToolEffectDescription
ReadRead-onlyRead a file (with optional line range)
WriteMutatingCreate or overwrite a file
EditMutatingTargeted text replacement within a file
DeleteDestructiveDelete a file or directory
BashVariesRun a shell command
GrepRead-onlySearch for patterns across files (ripgrep)
GlobRead-onlyList files matching a glob pattern
WebFetchRead-onlyFetch a URL and return its text content
WebSearchRead-onlySearch the web via DuckDuckGo
ThinkInternalExtended reasoning step (no side effects)
MemoryReadRead-onlyRead from project or global memory
MemoryWriteMutatingAppend a fact to a memory file
TodoWriteRead-onlyUpdate the session task list (Koda-owned state, no FS impact)
RecallContextRead-onlySearch session history for past context
ListSkillsRead-onlyList available skills
ActivateSkillInternalLoad a skill’s instructions into context
InvokeAgentVariesDelegate a task to a named sub-agent
ListFilesRead-onlyList directory contents
AskUserInteractiveAsk the user a clarifying question
ListBackgroundTasksRead-onlySnapshot all background tasks owned by the caller
CancelTaskRead-onlyCancel a background agent or shell process
WaitTaskRead-onlyBlock until one or more background tasks finish (max 300 s/task, atomic gather)

Approval behaviour by trust mode

CategoryToolsPlanSafeAuto
Read-onlyRead, Grep, Glob, ListFiles, WebFetch, WebSearch, RecallContext, TodoWrite✅ Auto✅ Auto✅ Auto
InternalThink, ActivateSkill✅ Auto✅ Auto✅ Auto
MutationsWrite, Edit, MemoryWrite❌ Deny⏸ Prompt✅ Auto
DestructiveDelete❌ Deny⏸ Prompt⏸ Prompt
Agent callsInvokeAgent✅ Auto✅ Auto✅ Auto
Background tasksListBackgroundTasks, CancelTask, WaitTask✅ Auto✅ Auto✅ Auto
User interactionAskUser⏸ Prompt⏸ Prompt⏸ Prompt
Safe shellgit status, grep, cargo test✅ Auto✅ Auto✅ Auto
Mutating shellecho > file, gh issue create❌ Deny⏸ Prompt✅ Auto
Destructive shellrm -rf, sudo, git push --force, git reset --hard❌ Deny⏸ Prompt⏸ Prompt
Outside-project writeWrite/Edit to paths outside project root❌ Deny⏸ Prompt⏸ Prompt

See Trust modes for the canonical policy matrix and the sub-agent context-sensitive variant (sub-agents resolve ⏸ Prompt as auto-approve for mutations and block for destructive ops, since there’s no human channel to prompt into).

WaitTask

WaitTask blocks until one or more background tasks (sub-agents or shell processes) finish. As of v0.2.25 it is an atomic multi-task gather: pass an array of task IDs and get back results for all of them in a single tool call, with per-task error isolation.

Request shape

{
  "task_ids": ["agent:1", "agent:2", "sh:7"]
}
  • task_ids (required): array of strings. Each ID comes from the “started” message printed by InvokeAgent (e.g. agent:1) or by Bash when run in the background (e.g. sh:7).
  • One ID per task; duplicates are deduplicated.
  • Per-task budget is 300 seconds (5 minutes). The budget is per-task, not per-call: gathering 4 tasks does not give you 1200 s.

Response shape

{
  "tasks": [
    {"task_id": "agent:1", "status": "success", "result": {...}},
    {"task_id": "agent:2", "status": "failed",  "error": "..."},
    {"task_id": "sh:7",     "status": "timeout"}
  ],
  "summary": {
    "total": 3, "success": 1, "failed": 1, "timeout": 1,
    "cancelled": 0, "forbidden": 0, "not_found": 0
  }
}

Per-task status is one of: success, failed, timeout, cancelled, forbidden (caller does not own the task), or not_found (typo or already-reaped task).

Error isolation

A failure in one task does not fail the whole call. The model can inspect the summary block to decide what to retry. This is the breaking change from v0.2.24, where WaitTask accepted a single task_id and returned the bare result envelope.

Migration from v0.2.24

Any prompt or skill that hardcoded {"task_id": "agent:1"} must be updated to {"task_ids": ["agent:1"]}. Single-task waits still work — the array just has length 1.