create_task
Create a repo-scoped coding task from a plan or built-in template, with optional pre-assessment for risk evaluation and controlled execution.
Instructions
Create a repo-scoped task from exactly one source. For ChatGPT, prefer the guarded inspect_only, feature_small, or fix_tests template when it fits. A stale watcher preserves the task but returns execution_blocked and directs the client to health_check; otherwise call wait_for_task until terminal. Use execution_mode=assess_only to pre-assess risk and get an assessment_id without creating a task; then invoke the returned next_tool_call using only execution_mode=execute and the full assessment_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | Required task goal when template is supplied. | |
| agent | No | Configured local agent name. Available agents: "codex", "opencode". run_task_loop also accepts "auto" for bounded routing. | |
| plan_id | No | Plan ID from save_plan | |
| template | No | Built-in guarded task template. ChatGPT should prefer inspect_only for diagnosis, feature_small for a scoped change, and fix_tests for known failing verification. Use with goal; rollback_scope_violation also requires source_task_id. | |
| repo_path | No | Required repository path inside workspaceRoot. No implicit workspace-root fallback is allowed. | |
| plan_title | No | Optional title used when inline_plan is supplied. | |
| inline_plan | No | Inline Markdown plan. It is safety-checked and persisted as an auditable saved plan before task creation. | |
| test_command | No | Optional exact-match verification command. Allowed: "cargo test", "npm run build", "npm run dist", "npm run doctor", "npm run format:check", "npm run lint", "npm run test", "npm test", "pnpm run build", "pnpm run dist", "pnpm run doctor", "pnpm run format:check", "pnpm run lint", "pnpm run test", "pnpm test", "pytest" | |
| assessment_id | No | Assessment ID from a prior assess_only call. When provided with execution_mode=execute, task parameters are loaded from the assessment record and locked to it. The full 128-bit ID (32 hex chars) must be provided; short IDs are display-only. | |
| execution_mode | No | assess_only: run deterministic risk checks and return an assessment_id without creating a task. execute (default): create and queue the task. When combined with assessment_id, the task parameters are loaded from the assessment record and freshness is revalidated. | execute |
| source_task_id | No | Required source task for rollback_scope_violation review. | |
| timeout_seconds | No | Total task timeout in seconds (default 900, max 3600) | |
| verify_commands | No | Recommended exact-match commands PatchWarden runs independently after the agent exits. Repository-scoped commands are re-authorized after repo_path is resolved. |