@runloop/agent-axon-client
    Preparing search index...

    Type Alias SDKSessionOptionsAlpha

    V2 API - UNSTABLE Options for creating a session.

    type SDKSessionOptions = {
        allowedTools?: string[];
        canUseTool?: CanUseTool;
        disallowedTools?: string[];
        env?: { [envVar: string]: string | undefined };
        executable?: "node" | "bun";
        executableArgs?: string[];
        hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>;
        model: string;
        pathToClaudeCodeExecutable?: string;
        permissionMode?: PermissionMode;
    }
    Index

    Claude SDK

    allowedTools?: string[]

    List of tool names that are auto-allowed without prompting for permission. These tools will execute automatically without asking the user for approval.

    canUseTool?: CanUseTool

    Custom permission handler for controlling tool usage. Called before each tool execution to determine if it should be allowed, denied, or prompt the user.

    disallowedTools?: string[]

    List of tool names that are disallowed. These tools will be removed from the model's context and cannot be used.

    env?: { [envVar: string]: string | undefined }

    Environment 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")
    executable?: "node" | "bun"

    Executable to use (node, bun)

    executableArgs?: string[]

    Arguments to pass to executable

    hooks?: Partial<Record<HookEvent, HookCallbackMatcher[]>>

    Hook callbacks for responding to various events during execution.

    model: string

    Model to use

    pathToClaudeCodeExecutable?: string

    Path to Claude Code executable

    permissionMode?: PermissionMode

    Permission 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