cursor_request_async
Start a durable background job for Cursor Agent CLI requests, then check progress with job status and collect the final output when ready.
Instructions
Start a Cursor Agent CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Cursor execution mode: plan (read-only planning) or ask (Q&A/read-only) | |
| force | No | Emit --force (Cursor yolo mode; auto-allows commands unless explicitly denied) | |
| model | No | Model name or alias passed via --model | |
| trust | No | Trust the workspace in headless mode | |
| addDir | No | Additional workspace root directories (--add-dir, repeatable). | |
| prompt | Yes | Prompt text for Cursor Agent CLI | |
| sandbox | No | Cursor sandbox mode override (--sandbox enabled|disabled) | |
| sessionId | No | Cursor chat/session ID to resume (emits --resume <id>). Note: the gw-* id minted for a brand-new gateway session is not resumable via sessionId; continue with resumeLatest:true. | |
| workspace | No | Workspace directory or saved workspace name (--workspace). This async tool always uses the CLI transport; remote HTTP/OAuth callers must pass a registered workspace alias, while local callers may pass local Cursor workspace paths. | |
| autoReview | No | Emit --auto-review (Cursor Smart Auto classifier for tool calls) | |
| workingDir | No | Local Cursor Agent process working directory. Distinct from --workspace, which selects a Cursor workspace or saved workspace name; this sets the process cwd. Passing both an absolute workspace path and a different workingDir is rejected rather than silently ranked. Stdio/local callers may pass local paths directly. Remote HTTP/OAuth callers must use relative paths inside a selected registered workspace. Do not call workspace_* tools to fix stdio/local provider path access. | |
| forceRefresh | No | Bypass dedup and force a fresh CLI run even if a recent identical request exists | |
| outputFormat | No | Cursor --output-format for --print mode | text |
| resumeLatest | No | Resume the latest Cursor chat (--continue). Note: the gw-* id minted for a brand-new gateway session is not resumable via sessionId; continue with resumeLatest:true. | |
| correlationId | No | Request trace ID (auto if omitted) | |
| idleTimeoutMs | No | Total-runtime bound, not an idle timer: this provider emits no output until it exits, so the child is killed after this duration even while healthy. Min 30s, max 1h, omit=1h default. Cursor only: this holds for the default text invocation; with outputFormat stream-json the CLI streams incrementally, so the same timer behaves as a genuine idle window. | |
| providerFlags | No | Flags passed to the provider binary verbatim, keyed exactly as the binary spells them (e.g. {"--best-of-n": "3", "--verbatim": true, "--rules": ["a", "b"]}). Use this for any flag your installed CLI accepts that this schema does not name: the binary decides what it supports, not the gateway. true emits the flag alone; a list REPEATS the flag once per item (pass a joined string if your CLI wants a comma-separated value). Values may not start with '-', and a flag the gateway is already emitting for this request is refused rather than duplicated. LOCAL stdio callers only: remote HTTP/OAuth callers are refused every flag here and should use this tool's declared parameters, which carry their own host-path and approval gates. | |
| approvalPolicy | No | approvalPolicy is unavailable for this provider. It has no effect with legacy, and mcp_managed is rejected before launch because ambient MCP configuration cannot be isolated. | |
| optimizePrompt | No | Optimize prompt before execution | |
| approvalStrategy | No | Approval strategy: legacy is supported. mcp_managed is rejected before launch because this adapter cannot isolate ambient MCP configuration. | legacy |
| compressResponse | No | Compress the response display text when collected via llm_job_result (native compressor; default: [compression].enabled). | |
| createNewSession | No | Force a new session |