{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "description": "Qwen Code settings configuration", "properties": { "mcpServers": { "description": "Configuration for MCP servers.", "type": "object", "additionalProperties": true }, "channels": { "description": "Configuration for messaging channels.", "type": "object", "additionalProperties": true }, "modelProviders": { "description": "Model providers configuration grouped by authType. Each authType contains an array of model configurations.", "type": "object", "additionalProperties": true }, "codingPlan": { "description": "Coding Plan template version tracking and configuration.", "type": "object", "properties": { "version": { "description": "SHA256 hash of the Coding Plan template. Used to detect template updates.", "type": "string" } } }, "env": { "description": "Environment variables to set as fallback defaults. These are loaded with the lowest priority: system environment variables > .env files > settings.json env field.", "type": "object", "additionalProperties": true }, "general": { "description": "General application settings.", "type": "object", "properties": { "preferredEditor": { "description": "The preferred editor to open files in.", "type": "string" }, "vimMode": { "description": "Enable Vim keybindings", "type": "boolean", "default": false }, "enableAutoUpdate": { "description": "Enable automatic update checks and installations on startup.", "type": "boolean", "default": true }, "showSessionRecap": { "description": "Auto-show a one-line \"where you left off\" recap when returning to the terminal after being away. Off by default. Use /recap to trigger manually regardless of this setting.", "type": "boolean", "default": false }, "sessionRecapAwayThresholdMinutes": { "description": "How many minutes the terminal must be blurred before an auto-recap fires on the next focus-in. Matches Claude Code's default of 5 minutes; raise if you briefly alt-tab and do not want recaps to pile up.", "type": "number", "default": 5 }, "gitCoAuthor": { "description": "Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code.", "type": "boolean", "default": true }, "checkpointing": { "description": "Session checkpointing settings.", "type": "object", "properties": { "enabled": { "description": "Enable session checkpointing for recovery", "type": "boolean", "default": false } } }, "debugKeystrokeLogging": { "description": "Enable debug logging of keystrokes to the console.", "type": "boolean", "default": false }, "language": { "description": "The language for the user interface. Use \"auto\" to detect from system settings. You can also use custom language codes (e.g., \"es\", \"fr\") by placing JS language files in ~/.qwen/locales/ (e.g., ~/.qwen/locales/es.js). Options: auto, en, zh, ru, de, ja, pt, fr", "enum": [ "auto", "en", "zh", "ru", "de", "ja", "pt", "fr" ], "default": "auto" }, "outputLanguage": { "description": "The language for LLM output. Use \"auto\" to detect from system settings, or set a specific language.", "type": "string", "default": "auto" }, "terminalBell": { "description": "Play terminal bell sound when response completes or needs approval.", "type": "boolean", "default": true }, "chatRecording": { "description": "Enable saving chat history to disk. Disabling this will also prevent --continue and --resume from working.", "type": "boolean", "default": true }, "defaultFileEncoding": { "description": "Default encoding for new files. Use \"utf-8\" (default) for UTF-8 without BOM, or \"utf-8-bom\" for UTF-8 with BOM. Only change this if your project specifically requires BOM. Options: utf-8, utf-8-bom", "enum": [ "utf-8", "utf-8-bom" ], "default": "utf-8" } } }, "output": { "description": "Settings for the CLI output.", "type": "object", "properties": { "format": { "description": "The format of the CLI output. Options: text, json", "enum": [ "text", "json" ], "default": "text" } } }, "dualOutput": { "description": "Dual-output sidecar mode: emit structured JSON events to a second channel while the TUI renders normally on stdout. See docs/users/features/dual-output.md. CLI flags take precedence over these settings.", "type": "object", "properties": { "jsonFile": { "description": "File path for structured JSON event output. Equivalent to --json-file. Ignored if --json-fd or --json-file is also set.", "type": "string" }, "inputFile": { "description": "File path for remote input commands (JSONL). Equivalent to --input-file. Ignored if --input-file is also set.", "type": "string" } } }, "ui": { "description": "User interface settings.", "type": "object", "properties": { "theme": { "description": "The color theme for the UI.", "type": "string", "default": "Qwen Dark" }, "statusLine": { "description": "Custom status line display configuration. Optional `refreshInterval` (seconds, >= 1) re-runs the command on a timer so external data stays fresh.", "type": "object", "additionalProperties": true }, "customThemes": { "description": "Custom theme definitions.", "type": "object", "additionalProperties": true }, "hideWindowTitle": { "description": "Hide the window title bar", "type": "boolean", "default": false }, "showStatusInTitle": { "description": "Show Qwen Code status and thoughts in the terminal window title", "type": "boolean", "default": false }, "hideTips": { "description": "Hide helpful tips in the UI", "type": "boolean", "default": false }, "showLineNumbers": { "description": "Show line numbers in the code output.", "type": "boolean", "default": true }, "showCitations": { "description": "Show citations for generated text in the chat.", "type": "boolean", "default": false }, "customWittyPhrases": { "description": "Custom witty phrases to display during loading.", "type": "array", "items": { "type": "string" } }, "enableWelcomeBack": { "description": "Show welcome back dialog when returning to a project with conversation history. Choosing \"Start new chat session\" suppresses the dialog for that project until the project summary changes.", "type": "boolean", "default": true }, "enableUserFeedback": { "description": "Show optional feedback dialog after conversations to help improve Qwen performance.", "type": "boolean", "default": true }, "enableFollowupSuggestions": { "description": "Show context-aware follow-up suggestions after task completion. Press Tab or Right Arrow to accept, Enter to accept and submit.", "type": "boolean", "default": false }, "enableCacheSharing": { "description": "Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental).", "type": "boolean", "default": true }, "enableSpeculation": { "description": "Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental).", "type": "boolean", "default": false }, "accessibility": { "description": "Accessibility settings.", "type": "object", "properties": { "enableLoadingPhrases": { "description": "Enable loading phrases (disable for accessibility)", "type": "boolean", "default": true }, "screenReader": { "description": "Render output in plain-text to be more screen reader accessible", "type": "boolean" } } }, "feedbackLastShownTimestamp": { "description": "The last time the feedback dialog was shown.", "type": "number", "default": 0 }, "compactMode": { "description": "Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).", "type": "boolean", "default": false } } }, "ide": { "description": "IDE integration settings.", "type": "object", "properties": { "enabled": { "description": "Enable IDE integration mode", "type": "boolean", "default": false }, "hasSeenNudge": { "description": "Whether the user has seen the IDE integration nudge.", "type": "boolean", "default": false } } }, "privacy": { "description": "Privacy-related settings.", "type": "object", "properties": { "usageStatisticsEnabled": { "description": "Enable collection of usage statistics", "type": "boolean", "default": true } } }, "telemetry": { "description": "Telemetry configuration.", "type": "object", "additionalProperties": true }, "fastModel": { "description": "Model used for generating prompt suggestions and speculative execution. Leave empty to use the main model. A smaller/faster model (e.g., qwen3-coder-flash) reduces latency and cost.", "type": "string", "default": "" }, "model": { "description": "Settings related to the generative model.", "type": "object", "properties": { "name": { "description": "The model to use for conversations.", "type": "string" }, "maxSessionTurns": { "description": "Maximum number of user/model/tool turns to keep in a session. -1 means unlimited.", "type": "number", "default": -1 }, "chatCompression": { "description": "Chat compression settings.", "type": "object", "additionalProperties": true }, "sessionTokenLimit": { "description": "The maximum number of tokens allowed in a session.", "type": "number" }, "skipNextSpeakerCheck": { "description": "Skip the next speaker check.", "type": "boolean", "default": true }, "skipLoopDetection": { "description": "Disable all loop detection checks (streaming and LLM).", "type": "boolean", "default": true }, "skipStartupContext": { "description": "Avoid sending the workspace startup context at the beginning of each session.", "type": "boolean", "default": false }, "enableOpenAILogging": { "description": "Enable OpenAI logging.", "type": "boolean", "default": false }, "openAILoggingDir": { "description": "Custom directory path for OpenAI API logs. If not specified, defaults to logs/openai in the current working directory.", "type": "string" }, "generationConfig": { "description": "Generation configuration settings.", "type": "object", "properties": { "timeout": { "description": "Request timeout in milliseconds.", "type": "number" }, "maxRetries": { "description": "Maximum number of retries for failed requests.", "type": "number" }, "enableCacheControl": { "description": "Enable cache control for DashScope providers.", "type": "boolean", "default": true }, "schemaCompliance": { "description": "The compliance mode for tool schemas sent to the model. Use \"openapi_30\" for strict OpenAPI 3.0 compatibility (e.g., for Gemini). Options: auto, openapi_30", "enum": [ "auto", "openapi_30" ], "default": "auto" }, "contextWindowSize": { "description": "Overrides the default context window size for the selected model. Use this setting when a provider's effective context limit differs from Qwen Code's default. This value defines the model's assumed maximum context capacity, not a per-request token limit.", "type": "number" } } } } }, "context": { "description": "Settings for managing context provided to the model.", "type": "object", "properties": { "fileName": { "description": "The name of the context file.", "type": "object", "additionalProperties": true }, "importFormat": { "description": "The format to use when importing memory.", "type": "string" }, "includeDirectories": { "description": "Additional directories to include in the workspace context. Missing directories will be skipped with a warning.", "type": "array", "items": { "type": "string" } }, "loadFromIncludeDirectories": { "description": "Whether to load memory files from include directories.", "type": "boolean", "default": false }, "clearContextOnIdle": { "description": "Settings for clearing stale context after idle periods. Use -1 to disable a threshold.", "type": "object", "properties": { "thinkingThresholdMinutes": { "description": "Minutes of inactivity before clearing old thinking blocks. Use -1 to disable.", "type": "number", "default": 5 }, "toolResultsThresholdMinutes": { "description": "Minutes of inactivity before clearing old tool result content. Use -1 to disable.", "type": "number", "default": 60 }, "toolResultsNumToKeep": { "description": "Number of most-recent compactable tool results to preserve when clearing. Floor at 1.", "type": "number", "default": 5 } } }, "fileFiltering": { "description": "Settings for git-aware file filtering.", "type": "object", "properties": { "respectGitIgnore": { "description": "Respect .gitignore files when searching", "type": "boolean", "default": true }, "respectQwenIgnore": { "description": "Respect .qwenignore files when searching", "type": "boolean", "default": true }, "enableRecursiveFileSearch": { "description": "Enable recursive file search functionality", "type": "boolean", "default": true }, "enableFuzzySearch": { "description": "Enable fuzzy search when searching for files.", "type": "boolean", "default": true } } } } }, "memory": { "description": "Settings for managed auto-memory.", "type": "object", "properties": { "enableManagedAutoMemory": { "description": "Enable background extraction of memories from conversations.", "type": "boolean", "default": true }, "enableManagedAutoDream": { "description": "Enable automatic consolidation (dream) of collected memories.", "type": "boolean", "default": false } } }, "permissions": { "description": "Permission rules controlling tool usage. Rules are evaluated in priority order: deny > ask > allow.", "type": "object", "properties": { "allow": { "description": "Tools or commands that are auto-approved without confirmation. Examples: \"ShellTool\", \"Bash(git *)\", \"ReadFileTool\".", "type": "array", "items": { "type": "string" } }, "ask": { "description": "Tools or commands that always require user confirmation. Takes precedence over allow rules.", "type": "array", "items": { "type": "string" } }, "deny": { "description": "Tools or commands that are always blocked. Highest priority rule. Examples: \"ShellTool\", \"Bash(rm -rf *)\".", "type": "array", "items": { "type": "string" } } } }, "slashCommands": { "description": "Configuration for slash commands exposed by the CLI. Useful for locking down the command surface in multi-tenant or enterprise deployments.", "type": "object", "properties": { "disabled": { "description": "Slash command names to hide and refuse to execute. Matched case-insensitively against the final command name (for extension commands this is the disambiguated form, e.g. \"myext.deploy\"). Merged as a union across settings scopes, so workspace settings can add to but not remove entries defined in system/user settings.", "type": "array", "items": { "type": "string" } } } }, "tools": { "description": "Settings for built-in and custom tools.", "type": "object", "properties": { "sandbox": { "description": "Sandbox execution environment (can be a boolean or a path string).", "type": "object", "additionalProperties": true }, "sandboxImage": { "description": "Sandbox image URI used by Docker/Podman when --sandbox-image and QWEN_SANDBOX_IMAGE are not set.", "type": "string" }, "shell": { "description": "Settings for shell execution.", "type": "object", "properties": { "enableInteractiveShell": { "description": "Use node-pty for an interactive shell experience. Falls back to child_process if PTY is unavailable.", "type": "boolean", "default": true }, "pager": { "description": "The pager command to use for shell output. Defaults to `cat`.", "type": "string", "default": "cat" }, "showColor": { "description": "Show color in shell output.", "type": "boolean", "default": false } } }, "core": { "description": "Deprecated. Use permissions.allow instead.", "type": "array", "items": { "type": "string" } }, "allowed": { "description": "Deprecated. Use permissions.allow instead.", "type": "array", "items": { "type": "string" } }, "exclude": { "description": "Deprecated. Use permissions.deny instead.", "type": "array", "items": { "type": "string" } }, "approvalMode": { "description": "Approval mode for tool usage. Controls how tools are approved before execution. Options: plan, default, auto-edit, yolo", "enum": [ "plan", "default", "auto-edit", "yolo" ], "default": "default" }, "autoAccept": { "description": "Automatically accept and execute tool calls that are considered safe (e.g., read-only operations) without explicit user confirmation.", "type": "boolean", "default": false }, "discoveryCommand": { "description": "Command to run for tool discovery.", "type": "string" }, "callCommand": { "description": "Command to run for tool calls.", "type": "string" }, "useRipgrep": { "description": "Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance.", "type": "boolean", "default": true }, "useBuiltinRipgrep": { "description": "Use the bundled ripgrep binary. When set to false, the system-level \"rg\" command will be used instead. This setting is only effective when useRipgrep is true.", "type": "boolean", "default": true }, "truncateToolOutputThreshold": { "description": "Truncate tool output if it is larger than this many characters. Set to -1 to disable.", "type": "number", "default": 25000 }, "truncateToolOutputLines": { "description": "The number of lines to keep when truncating tool output.", "type": "number", "default": 1000 } } }, "mcp": { "description": "Settings for Model Context Protocol (MCP) servers.", "type": "object", "properties": { "serverCommand": { "description": "Command to start an MCP server.", "type": "string" }, "allowed": { "description": "A list of MCP servers to allow.", "type": "array", "items": { "type": "string" } }, "excluded": { "description": "A list of MCP servers to exclude.", "type": "array", "items": { "type": "string" } } } }, "security": { "description": "Security-related settings.", "type": "object", "properties": { "folderTrust": { "description": "Settings for folder trust.", "type": "object", "properties": { "enabled": { "description": "Setting to track whether Folder trust is enabled.", "type": "boolean", "default": false } } }, "auth": { "description": "Authentication settings.", "type": "object", "properties": { "selectedType": { "description": "The currently selected authentication type.", "type": "string" }, "enforcedType": { "description": "The required auth type. If this does not match the selected auth type, the user will be prompted to re-authenticate.", "type": "string" }, "useExternal": { "description": "Whether to use an external authentication flow.", "type": "boolean" }, "apiKey": { "description": "API key for OpenAI compatible authentication.", "type": "string" }, "baseUrl": { "description": "Base URL for OpenAI compatible API.", "type": "string" } } }, "allowedHttpHookUrls": { "description": "Whitelist of URL patterns for HTTP hooks. Supports * wildcard. If empty, all URLs are allowed (subject to SSRF protection).", "type": "array", "items": { "description": "URL pattern (supports * wildcard)", "type": "string" } } } }, "advanced": { "description": "Advanced settings for power users.", "type": "object", "properties": { "autoConfigureMemory": { "description": "Automatically configure Node.js memory limits", "type": "boolean", "default": false }, "dnsResolutionOrder": { "description": "The DNS resolution order.", "type": "string" }, "excludedEnvVars": { "description": "Environment variables to exclude from project context.", "type": "array", "items": { "type": "string" }, "default": [ "DEBUG", "DEBUG_MODE" ] }, "bugCommand": { "description": "Configuration for the bug report command.", "type": "object", "additionalProperties": true }, "runtimeOutputDir": { "description": "Custom directory for runtime output (temp files, debug logs, session data, todos, etc.). Config files remain at ~/.qwen. Env var QWEN_RUNTIME_DIR takes priority.", "type": "string" }, "tavilyApiKey": { "description": "⚠️ DEPRECATED: Please use webSearch.provider configuration instead. Legacy API key for the Tavily API.", "type": "string" } } }, "webSearch": { "description": "Configuration for web search providers.", "type": "object", "additionalProperties": true }, "agents": { "description": "Settings for multi-agent collaboration features (Arena, Team, Swarm).", "type": "object", "properties": { "displayMode": { "description": "Display mode for multi-agent sessions. Currently only \"in-process\" is supported. Options: in-process", "enum": [ "in-process" ] }, "arena": { "description": "Settings for Arena (multi-model competitive execution).", "type": "object", "properties": { "worktreeBaseDir": { "description": "Custom base directory for Arena worktrees. Defaults to ~/.qwen/arena.", "type": "string" }, "preserveArtifacts": { "description": "When enabled, Arena worktrees and session state files are preserved after the session ends or the main agent exits.", "type": "boolean", "default": false }, "maxRoundsPerAgent": { "description": "Maximum number of rounds (turns) each agent can execute. No limit if unset.", "type": "number" }, "timeoutSeconds": { "description": "Total timeout in seconds for the Arena session. No limit if unset.", "type": "number" } } }, "team": { "description": "Settings for Agent Team (role-based collaborative execution). Reserved for future use.", "type": "object", "additionalProperties": true }, "swarm": { "description": "Settings for Agent Swarm (parallel sub-agent execution). Reserved for future use.", "type": "object", "additionalProperties": true } } }, "disableAllHooks": { "description": "Temporarily disable all hooks without deleting configurations. Default is false (hooks enabled).", "type": "boolean", "default": false }, "hooks": { "description": "Hook event configurations for extending CLI behavior at various lifecycle points.", "type": "object", "properties": { "UserPromptSubmit": { "description": "Hooks that execute before agent processing. Can modify prompts or inject context.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "Stop": { "description": "Hooks that execute after agent processing. Can post-process responses or log interactions.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "Notification": { "description": "Hooks that execute when notifications are sent.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "PreToolUse": { "description": "Hooks that execute before tool execution.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "PostToolUse": { "description": "Hooks that execute after successful tool execution.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "PostToolUseFailure": { "description": "Hooks that execute when tool execution fails. ", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "SessionStart": { "description": "Hooks that execute when a new session starts or resumes.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "SessionEnd": { "description": "Hooks that execute when a session ends.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "PreCompact": { "description": "Hooks that execute before conversation compaction.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "SubagentStart": { "description": "Hooks that execute when a subagent (Task tool call) is started.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "SubagentStop": { "description": "Hooks that execute right before a subagent (Task tool call) concludes its response.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } }, "PermissionRequest": { "description": "Hooks that execute when a permission dialog is displayed.", "type": "array", "items": { "description": "A hook definition with an optional matcher and a list of hook configurations.", "type": "object", "properties": { "matcher": { "description": "An optional matcher pattern to filter when this hook definition applies.", "type": "string" }, "sequential": { "description": "Whether the hooks should be executed sequentially instead of in parallel.", "type": "boolean" }, "hooks": { "description": "The list of hook configurations to execute.", "type": "array", "items": { "description": "A hook configuration entry that defines a hook to execute.", "type": "object", "properties": { "type": { "description": "The type of hook. Note: \"function\" type is only available via SDK registration, not settings.json.", "type": "string", "enum": [ "command", "http" ] }, "command": { "description": "The command to execute when the hook is triggered. Required for \"command\" type.", "type": "string" }, "url": { "description": "The URL to send the POST request to. Required for \"http\" type.", "type": "string" }, "headers": { "description": "HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).", "type": "object", "additionalProperties": { "type": "string" } }, "allowedEnvVars": { "description": "List of environment variables allowed for interpolation in headers and URL.", "type": "array", "items": { "type": "string" } }, "name": { "description": "An optional name for the hook.", "type": "string" }, "description": { "description": "An optional description of what the hook does.", "type": "string" }, "timeout": { "description": "Timeout in seconds for the hook execution.", "type": "number" }, "env": { "description": "Environment variables to set when executing the hook command.", "type": "object", "additionalProperties": { "type": "string" } }, "async": { "description": "Whether to execute the hook asynchronously (non-blocking, for \"command\" type only).", "type": "boolean" }, "once": { "description": "Whether to execute the hook only once per session (for \"http\" type).", "type": "boolean" }, "statusMessage": { "description": "A message to display while the hook is executing.", "type": "string" }, "shell": { "description": "The shell to use for command execution.", "type": "string", "enum": [ "bash", "powershell" ] } }, "required": [ "type" ] } } }, "required": [ "hooks" ] } } } }, "experimental": { "description": "Settings to enable experimental features.", "type": "object", "properties": { "cron": { "description": "Enable in-session cron/loop tools (experimental). When enabled, the model can create recurring prompts using cron_create, cron_list, and cron_delete tools. Can also be enabled via QWEN_CODE_ENABLE_CRON=1 environment variable.", "type": "boolean", "default": false } } }, "$version": { "type": "number", "description": "Settings schema version for migration tracking.", "default": 3 } }, "additionalProperties": true }