Skip to main content
Complete reference for all options available when creating sessions with the Chucky SDK.

Quick Reference

Model Options

model

The Claude model to use.
Available models: Shortcuts:

fallbackModel

Model to use if primary model is unavailable or rate-limited.

Limit Options

maxTurns

Maximum number of conversation turns (user message + assistant response = 1 turn).
When reached, session ends with a result indicating the limit was hit.

maxBudgetUsd

Maximum spend for this session in USD.
Throws BudgetExceededError when exceeded.

maxThinkingTokens

Maximum tokens for Claude’s extended thinking (if enabled).

Prompt Options

systemPrompt

Instructions that guide Claude’s behavior. Can be a string or object. String format:
Object format with preset:
Preset with custom append:
Available presets:

Tool Options

tools

Array of tool definitions to make available to Claude.

mcpServers

Array of MCP server definitions containing multiple tools.

allowedTools

Whitelist of tool names Claude can use. If specified, only these tools are available.

disallowedTools

Blacklist of tool names Claude cannot use.

Session Management

sessionId

Resume an existing session by ID.

forkSession

Create a copy of an existing session instead of resuming it.

continue

Continue from where the previous session left off.

resumeSessionAt

Resume at a specific point in the conversation history.

settingSources

Configure which setting sources to load configuration from.
Available sources:

jobId

Job ID for tracking background/deferred executions (used with the /incubate API).
This is useful when correlating sessions with external job tracking systems.

Output Options

outputFormat

Force structured output using JSON Schema.
The final result will be valid JSON matching the schema.

includePartialMessages

Include partial (streaming) messages in the message history.

Environment Options

env

Environment variables available to tools in the sandbox.

permissionMode

How Claude handles permission requests for tools.
Available modes:

allowDangerouslySkipPermissions

Enable bypass of all permission checks. Use with caution.
Only use in trusted environments. This allows Claude to execute any tool without confirmation.

betas

Enable beta features.
Beta features may change without notice. Check the Chucky changelog for available beta features.

Agent Options

agents

Define sub-agents that Claude can delegate to.

Client Options

Options passed when creating the ChuckyClient:

token

JWT token for authentication. Required.

baseUrl

WebSocket endpoint URL. Override for staging/development.

debug

Enable debug logging.

timeout

Connection timeout in milliseconds.

keepAliveInterval

Interval for keep-alive pings in milliseconds.

autoReconnect

Automatically reconnect on connection loss.

maxReconnectAttempts

Maximum reconnection attempts before giving up.

Type Definitions


Examples

Minimal Session

With Tools

Structured Output

Resume Existing

Development Mode