claude_run
Runs a headless Claude Code session to write or edit code and execute project commands, blocking until completion and returning the result for review or follow-up.
Instructions
Run Claude Code (headless, DeepSeek-backed) to write/edit code and run commands in the project. Blocks until Claude Code finishes and returns its result.
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_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to /app. | |
| prompt | Yes | Instructions for Claude Code: the initial task, or specific feedback when continuing via resume_session_id. | |
| max_turns | No | Claude Code --max-turns. | |
| timeout_sec | No | Hard timeout in seconds before the process is killed. Defaults to 1800. | |
| allowed_tools | No | Claude Code --allowedTools, e.g. 'Read,Edit,Bash(npm test)'. | |
| permission_mode | No | Claude Code --permission-mode. Defaults to 'acceptEdits'. | |
| resume_session_id | No | session_id from a prior claude_run call, to continue that conversation with feedback. |