Ask Claude Code (new session)
claude_askDelegate large refactors and careful reviews to a Claude Code sub-agent in a new session; pass a workspace directory so it can inspect your repo.
Instructions
Best for large refactors and careful reviews: Claude Code (claude -p) as a
sub-agent, for hosts other than Claude Code, in a NEW session. Pass
workspace=; without it the sub-agent sees no repo. Follow up with
claude_continue. Uses your Claude plan login or ANTHROPIC_API_KEY. Its sandbox is
agent-enforced; workspace-write edits files but runs no shell. Autonomous agent:
trusted prompts only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "claude_ask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model (`--model`): an alias such as "haiku", "sonnet", "opus", or a full model id. Omit for your Claude Code default. | |
| watch | No | If true, open a live "watch" view streaming Claude Code's steps. Same final text is returned. Best-effort. Default false. | |
| prompt | Yes | Question or instruction for Claude Code. | |
| sandbox | No | Permission policy, enforced by Claude Code itself (not an OS sandbox): "read-only" (default: reads and searches files, no edits, no shell, no web), "workspace-write" (may edit files inside the workspace, but runs NO shell commands, so it cannot run tests or builds), or "danger-full-access" (every permission check skipped — avoid). | read-only |
| timeout_s | No | Max seconds to wait for claude to complete. Default 180. | |
| workspace | No | Working directory for the session. Defaults to the server cwd. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |