run
Submit a complete coding work unit to a dedicated worker agent, passing the goal, workspace, and allowed files, and receive a task ID to track progress.
Instructions
Submit a complete work unit to a worker agent and return its task_id.
Requirements:
agent_id: exact id from agents(); every task is explicitly bound to one agent.
goal: full objective, constraints and context in ONE prompt (complete work unit; do not ping-pong per file/line).
workspace: directory path (canonicalized to an absolute path by the kernel).
scope_files: RELATIVE paths the worker may modify (absolute or escaping paths are rejected; enforced by diff audit).
forbid: extra prohibitions.
verify: commands executed by the kernel after the turn; the worker cannot pass by editing them. Prefer list form; string form is arg-split (no shell) unless config verify_allow_shell is on. Exit code 0 = pass.
mode: adapter-specific permission mode (zcode: plan|build|edit|yolo).
session_ref: task_id of a previous task on the SAME agent+workspace to continue its native session. Cross-agent/workspace reuse is rejected.
timeout_sec: per-turn timeout; on timeout the task becomes blocked (never silently resubmitted; the lock is held and a watcher keeps observing).
wait_sec: bounded block until finish (default: return immediately).
budget_tokens: hard token budget; exceeded -> task failed (budget_exceeded).
permission_policy: "deny" (default) or "allow" (auto-allow within this task).
repair_allowed: one pre-authorized targeted repair attempt (default true).
idempotency_key: resubmitting the same key returns the original task.
Returns a snapshot dict with ok/status/code. A run() success only means SUBMITTED, not done — follow with wait()/inspect().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | ||
| mode | No | ||
| forbid | No | ||
| verify | No | ||
| agent_id | Yes | ||
| wait_sec | No | ||
| workspace | Yes | ||
| scope_files | No | ||
| session_ref | No | ||
| timeout_sec | No | ||
| budget_tokens | No | ||
| repair_allowed | No | ||
| idempotency_key | No | ||
| permission_policy | No |