delegate_task_readonly
Delegate read-only analysis tasks to a CLI agent for code review, bug detection, and report generation. Returns a task ID immediately; use get_task_result to retrieve results asynchronously.
Instructions
Delegate a read-only analysis task to a CLI agent.
The agent is sandboxed to cwd directory only. Use include_dirs to grant access to additional directories.
It is semantically identical to delegate_task but signals that the task is primarily for analysis.
Use this for code review, architecture analysis, finding bugs, writing reports, etc.
Returns a task_id immediately (non-blocking). Use get_task_result to check status and retrieve the result.
IMPORTANT: CLI providers can take ~15-20s before the agent begins working. Set timeout to at least 60s for simple tasks, 300s+ for complex analysis.
WORKSPACE: The agent can only use file tools within cwd and include_dirs. For other paths it can use shell commands (cat, find, ls).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to current working directory. | |
| files | No | Known relevant file paths used as structured focus hints for context resolution. May include paths attached in the UI. | |
| model | No | Model to use in provider/model format (e.g. deepseek/deepseek-v4-pro). Leave empty for default. | |
| prompt | Yes | The analysis task for the CLI agent. | |
| runner | No | Runner ID from agent-pool.config.json. Default: "local". Use SSH runners for remote execution. | |
| chat_id | No | The chat ID created for this task via create_chat. Optional. | |
| timeout | No | Timeout in seconds. Default: 600 (10 minutes). | |
| provider | No | CLI provider to use. codex = Codex CLI, antigravity = Antigravity CLI, opencode = OpenCode CLI, claude = Claude Code CLI. Default: codex. | |
| agent_slug | No | Agent identity slug (e.g. "code-reviewer"). Auto-resolves prompt from team-memory agents/{slug}.md. | |
| session_id | No | Resume an existing provider session/thread by ID. Supported by Antigravity, Codex, OpenCode, and Claude Code where available. Use list_sessions for Antigravity sessions. | |
| focus_graph | No | Portal-provided compact project-graph focus context for files[], including symbols, imports, dependencies, and web component summaries when present. Usually injected automatically; direct callers should prefer files[]. | |
| serviceTier | No | Service tier for Codex. Codex maps to service_tier. | |
| context_mode | No | Context package mode for delegated agents. auto injects the metadata-first resolved context package. off disables injection. Default: auto. | |
| include_dirs | No | Additional directories to include in the agent workspace scope. By default the agent only has access to cwd. | |
| on_wait_hint | No | Custom coaching message shown when polling for results. | |
| system_prompt | No | Pre-resolved system prompt to prepend to the task. Overrides agent_slug resolution. | |
| parent_chat_id | No | The parent chat or task ID that initiated this delegation. Used for hierarchy. Optional. | |
| resource_group | No | Existing resource group from local portal configuration. Overrides the agent frontmatter resource_group. | |
| reasoningEffort | No | Provider reasoning effort. Codex accepts the selected model value and maps it to model_reasoning_effort. Claude Code accepts low, medium, high, xhigh, or max and maps it to --effort. |