run_task
Execute a development task with automated verify and auto-fix cycles, returning structured evidence of attempts and changes.
Instructions
ORCHESTRATED + MUTATING: run a full execute → git-evidence → verify → auto-fix loop server-side and return structured evidence (attempts, changed files, diff, verify output). Same approval bar as execute_task: only after the user approved a plan. Prefer this over execute_task when a test/build command can verify the work. If the result has status 'needs_advisor', answer the question via continue_task with the returned session_id. cancel_task also aborts in-flight grok sub-processes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute path to the target project working directory | |
| model | No | Optional Grok model id (defaults to CLI / MCP_GROK_MODEL) | |
| prompt | Yes | Task instructions for Grok (be specific about files, tests, constraints) | |
| max_turns | No | Max agentic turns for Grok | |
| background | No | If true, start Grok in background and return job_id immediately | |
| session_id | No | Optional UUID to create/resume a named Grok session | |
| timeout_sec | No | Timeout in seconds (default 600) | |
| verify_command | No | Shell command run in cwd after execution (e.g. 'npm test'). Omitted → git evidence only. | |
| max_fix_attempts | No | Auto-fix rounds when verify_command fails (default 2; 0 disables) | |
| verify_timeout_sec | No | Timeout in seconds for each verify_command run (default 300) |