8 pages for setmode.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
mid-conversation-effort-example
Claude Developer Platform · in the page
build-with-claude/mid-conversation-effort-example
…mode on or off. The notice is delivered with the next user turn. setMode(modeOn: boolean): void { if (modeOn === this.#modeOn) { return; } // An exit notice is only owed…
Configure your agent
Claude Code CLI · in the page
agent-sdk/configuration
…without control methods Both languages have the same setters: * **`setModel()` / `set_model()`**: switches the model. Call it with no model to switch to [Claude Code's default model](https://code.c…
Configure permissions
Claude Code CLI · in the page
agent-sdk/permissions
…(https://code.claude.com/docs/en/agent-sdk/python#claudesdkclient), [`setModel()`](https://code.claude.com/docs/en/agent-sdk/typescript#query-object), or [`applyFlagSettings()`](https://code.claude.co…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…"addRules", "replaceRules", "removeRules", "setMode", "addDirectories", "removeDirectories", ] rules: list[PermissionRuleValue] | None = None beha…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…sResult>; setPermissionMode(mode: PermissionMode): Promise<void>; setModel(model?: string): Promise<void>; setMaxThinkingTokens(maxThinkingTokens: number | null): Promise<void>; applyFlagSetti…
Hooks reference
Claude Code CLI · in the page
hooks
…, `destination` | Removes matching rules of the given `behavior` | | `setMode` | `mode`, `destination` | Changes the permission mode. Valid modes are `default`, `auto`, `acceptEdits`, `dontAsk`, `bypa…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…your hook's output can include an `updatedPermissions` array with a `setMode` entry. The `mode` value is any permission mode like `default`, `acceptEdits`, or `bypassPermissions`, and `destination: "…
Model configuration
Claude Code CLI · in the page
model-config
…e [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) `setModel()` method, through an app such as the [Desktop app](https://code.claude.com/docs/en/desktop.md), or from a device connect…