AlphaOptionalallowedList of tool names that are auto-allowed without prompting for permission. These tools will execute automatically without asking the user for approval.
OptionalcanCustom permission handler for controlling tool usage. Called before each tool execution to determine if it should be allowed, denied, or prompt the user.
OptionaldisallowedList of tool names that are disallowed. These tools will be removed from the model's context and cannot be used.
OptionalenvEnvironment variables to pass to the Claude Code process.
Defaults to process.env.
SDK consumers can identify their app/library to include in the User-Agent header by setting:
CLAUDE_AGENT_SDK_CLIENT_APP - Your app/library identifier (e.g., "my-app/1.0.0", "my-library/2.1")OptionalexecutableExecutable to use (node, bun)
OptionalexecutableArguments to pass to executable
OptionalhooksHook callbacks for responding to various events during execution.
Model to use
OptionalpathPath to Claude Code executable
OptionalpermissionPermission mode for the session.
'default' - Standard permission behavior, prompts for dangerous operations'acceptEdits' - Auto-accept file edit operations'plan' - Planning mode, no execution of tools'dontAsk' - Don't prompt for permissions, deny if not pre-approved
V2 API - UNSTABLE Options for creating a session.