Open History to see the last commit
1type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan'
2
3/**
4 * Per-call provider options for the Claude Code adapter, passed via
5 * `modelOptions` on `chat()`.
6 */
7export interface ClaudeCodeTextProviderOptions {
8 /**
9 * Resume an existing Claude Code session. The adapter emits the session id
10 * of every run via a CUSTOM `claude-code.session-id` stream event; thread
11 * it back here to continue that session (only the latest user message is
12 * sent — the harness already holds the prior context).
13 */
14 sessionId?: string
15 /**
16 * When resuming, fork to a new session id instead of continuing the
17 * original session.
18 */
19 forkSession?: boolean
20 /** Per-call override of the configured max harness turns. */
21 maxTurns?: number
22 /** Per-call override of the configured permission mode. */
23 permissionMode?: PermissionMode
24 /** Per-call override of the allowed built-in tool list. */
25 allowedTools?: Array<string>
26 /** Per-call override of the disallowed built-in tool list. */
27 disallowedTools?: Array<string>
28 /** Per-call override of the harness working directory. */
29 cwd?: string
30 /**
31 * `'api-key'` (default) injects `ANTHROPIC_API_KEY`.
32 * `'host'` uses `claude login`.
33 * Not inferred from the sandbox.
34 */
35 authMode?: 'host' | 'api-key'
36}