Overview
This node integrates with the Claude Code AI SDK to perform AI-powered coding tasks through conversational interactions. It allows users to send prompts or instructions to Claude Code, which can generate code, analyze projects, search files, and execute commands within a specified project directory. The node supports continuing previous conversations, controlling allowed tools during execution, and customizing output formats.
Common scenarios include:
- Generating or refactoring code snippets based on natural language prompts.
- Automating code review or debugging by querying the AI about project files.
- Running complex multi-turn coding conversations with tool usage like file edits, searches, or web fetches.
- Integrating AI-assisted coding workflows into automation pipelines.
Practical examples:
- "Create a Python function to parse CSV files" — generates the function code.
- Continuing a prior conversation to refine or extend generated code.
- Searching project files for TODO comments using built-in tools.
- Fetching web content to incorporate external data into code generation.
Properties
| Name | Meaning |
|---|---|
| Prompt | The instruction or query sent to Claude Code. Supports expressions to dynamically use data from previous nodes. Example: Create a Python function to parse CSV files. |
| Model | Selects the Claude model variant: - Sonnet: Fast and efficient for most tasks. - Opus: More capable for complex tasks. |
| Max Turns | Maximum number of back-and-forth conversation turns allowed in the session. |
| Timeout | Maximum time (in seconds) to wait for the AI response before aborting the operation. |
| Project Path | Directory path where Claude Code runs, allowing access to project files and command execution. If empty, uses current working directory. |
| Output Format | Format of the node's output data: - Structured: Object with messages, summary, result, and metrics. - Messages: Raw array of all exchanged messages. - Text: Only the final result text. |
| Allowed Tools | Built-in tools Claude Code is permitted to use during execution. Options include: Bash, Edit, Exit Plan Mode, Glob, Grep, LS, MultiEdit, Notebook Edit/Read, Read, Task, Todo Write, Web Fetch/Search, Write. Default includes some web and task tools plus exit plan mode. |
| Additional Options | Collection of optional settings: - System Prompt: Extra context or instructions for Claude Code. - Require Permissions: Whether tool use requires explicit permission. - Debug Mode: Enables debug logging. |
Output
The node outputs JSON data structured according to the selected Output Format:
Structured:
An object containing:messages: Array of all exchanged messages (user, assistant, system).summary: Counts of user messages, assistant messages, tool uses, presence of result, and available tools.result: Final result text or error message if any.metrics: Performance data such as duration (ms), number of turns, cost, and usage statistics.success: Boolean indicating if the operation succeeded.
Messages:
Raw array of all messages exchanged during the conversation, including user inputs, assistant responses, and tool usage events.Text:
Only the final result text from the AI assistant, along with metadata fields like success status, duration, and cost.
If the node were to output binary data (not indicated here), it would typically represent files or artifacts generated or modified by Claude Code.
Dependencies
- Requires an API key credential for authenticating with the Claude Code service.
- Uses the official Claude Code SDK (
@anthropic-ai/claude-code) for communication. - Node configuration may require setting appropriate timeout values and project paths depending on the environment.
- Access permissions for executing commands or reading/writing files depend on the configured project directory.
Troubleshooting
Empty Prompt Error:
The prompt input is mandatory. Providing an empty or whitespace-only prompt will cause an error. Ensure the prompt field contains valid instructions.Timeout Errors:
If the operation times out (default 300 seconds), an abort error occurs. Increase the timeout value in the node settings if longer processing is expected.Permission Issues:
When "Require Permissions" is enabled, tool usage may be blocked unless explicitly permitted. Disable this option or grant necessary permissions to avoid failures.Invalid Project Path:
Specifying a non-existent or inaccessible project directory may cause errors when Claude Code tries to access files or run commands. Verify the path correctness and permissions.Debugging:
Enable "Debug Mode" to get detailed console logs of the execution process, including prompts, model selection, tool usage, and received messages. Useful for diagnosing issues.API or Network Failures:
Network interruptions or invalid API credentials will cause execution errors. Check connectivity and credential validity.