run
Launch an AI coding agent as a background process and receive a PID instantly, enabling asynchronous monitoring and result retrieval.
Instructions
AI Agent Runner: Starts a Claude, Codex, Antigravity (Gemini), OpenCode, Grok, or Pi CLI process in the background and returns a PID immediately. Use list_processes and get_result to monitor progress.
• File ops: Create, read, (fuzzy) edit, move, copy, delete, list files, analyze/ocr images, file content analysis • Code: Generate / analyse / refactor / fix • Git: Stage ▸ commit ▸ push ▸ tag (any workflow) • Terminal: Run any CLI cmd or open URLs • Web search + summarise content on-the-fly • Multi-step workflows & GitHub integration
IMPORTANT: This tool now returns immediately with a PID. Use other tools to check status and get results.
Supported models: "claude-ultra", "codex-ultra", "gemini-ultra", "sol", "luna", "sonnet", "sonnet[1m]", "opus", "opusplan", "fable", "haiku", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "gpt-5.4", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4-mini", "gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gemini-3.8-flash-high", "gemini-3.8-flash-medium", "gemini-3.8-flash-low", "gemini-3.7-flash-high", "gemini-3.7-flash-medium", "gemini-3.7-flash-low", "gemini-3.6-flash-high", "gemini-3.6-flash-medium", "gemini-3.6-flash-low", "gemini-3.1-pro-high", "gemini-3.1-pro-low", "grok", "grok-4.6", "grok-4.5", "opencode", "pi", "oc-<provider/model>", "pi-<provider/model>"
Prompt input: You must provide EITHER prompt (string) OR prompt_file (file path), but not both.
Prompt tips
Be concise, explicit & step-by-step for complex tasks.
Check process status with list_processes
Get results with get_result using the returned PID
Kill long-running processes with kill_process if needed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | The model to use. Aliases (including user config): "claude-ultra" (opus; auto max reasoning), "codex-ultra" (gpt-6-astra; auto ultra reasoning), "gemini-ultra" (gemini-3.8-flash-high), "sol" (gpt-6-sol), "luna" (gpt-6-luna). An explicit reasoning_effort overrides the alias default. Standard: "sonnet", "sonnet[1m]", "opus", "opusplan", "fable", "haiku", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "gpt-5.4", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4-mini", "gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gemini-3.8-flash-high", "gemini-3.8-flash-medium", "gemini-3.8-flash-low", "gemini-3.7-flash-high", "gemini-3.7-flash-medium", "gemini-3.7-flash-low", "gemini-3.6-flash-high", "gemini-3.6-flash-medium", "gemini-3.6-flash-low", "gemini-3.1-pro-high", "gemini-3.1-pro-low", "grok", "grok-4.6", "grok-4.5", "opencode", "pi". Gemini models run through Antigravity CLI (agy); use agy models for current availability. Model effort suffixes must match reasoning_effort when supplied. Fable may require usage credits. Grok accepts native grok-* model names; grok uses its CLI-configured default unless a user alias named grok exists; that alias retains precedence. Native model names such as grok-4.6 select the Grok backend. Omitted effort uses the CLI default; grok and unknown Grok models accept low/medium/high, grok-4.6 also accepts xhigh. OpenCode accepts explicit dynamic models using "oc-<provider/model>". Pi accepts its configured default with "pi" or an explicit dynamic model using "pi-<provider/model>"; discover current choices with "pi --list-models". | |
| prompt | No | The detailed natural language prompt for the agent to execute. Either this or prompt_file is required. | |
| session_id | No | Optional session ID to resume a previous session. Supported for Claude, Codex, Gemini, OpenCode, Grok, and Pi. Antigravity resumes its conversation_id via --conversation; old Gemini CLI sessions cannot be resumed. Grok resumes via --resume, preserving the session ID. OpenCode and Pi resume in place via --session and may also be combined with explicit model selection. | |
| workFolder | Yes | The working directory for the agent execution. Must be an absolute path. | |
| prompt_file | No | Path to a file containing the prompt. Either this or prompt is required. Must be an absolute path or relative to workFolder. | |
| reasoning_effort | No | Reasoning control for Claude, Codex, Antigravity (Gemini), Grok, and Pi. Claude uses --effort with "low", "medium", "high", "xhigh", "max". Codex uses model_reasoning_effort with "low", "medium", "high", "xhigh"; GPT-6 Astra/Sol and GPT-5.6 Sol/Terra also support "max" and "ultra", while GPT-6 Luna and GPT-5.6 Luna support "max". Grok: grok-4.6=low/medium/high/xhigh; grok-4.5, grok (configured default), and other grok-* models=low/medium/high. Pi uses --thinking with off/minimal/low/medium/high/xhigh/max. Omitted effort uses the CLI default. Antigravity uses --effort low/medium/high; it must match any effort suffix in the model name. OpenCode does not support reasoning_effort in this integration. |