qwen-code/packages/vscode-ide-companion/schemas/settings.schema.json
Shaojin Wen afbb5e71db
fix(cli): rework session recap rendering and add blur threshold setting (#3482)
* feat(cli): make recap away-threshold configurable

The 5-minute blur threshold was hard-coded. Confirmed from Claude
Code's own binary (v2.1.113) that 5 minutes is their default as well
(and that they shift to 60 minutes when 1h prompt-cache is active) —
so the default stays, but expose it as `general.sessionRecapAway
ThresholdMinutes` for users who briefly alt-tab often and don't want
recaps piling up, or who want to lower it for testing.

Non-positive / unset values fall back to the 5-minute default, so
dropping the key has the same behavior as before.

* fix(core): align recap prompt with Claude Code (1-2 sentences, ≤40 words)

The earlier "exactly one sentence, 80-char cap" was an over-correction
to a single in-the-moment ask. Going back to it: the natural shape of
"current task + next action" is two clauses, and forcing them into a
single sentence either crams them with a semicolon or drops the next
action entirely on complex sessions.

Adopt Claude Code's prompt verbatim (extracted from the v2.1.113
binary): "under 40 words, 1-2 plain sentences, no markdown. Lead with
the overall goal and current task, then the one next action. Skip
root-cause narrative, fix internals, secondary to-dos, and em-dash
tangents." Add a Chinese-budget note (~80 chars) and keep the
<recap>...</recap> wrapping that protects against reasoning-model
preambles leaking into the UI.

The sticky banner already re-measures controls height when the
recap toggles, so a 2-line render lays out cleanly.

Sweep "one-line" out of user-facing copy (settings description,
slash-command description, feature docs, design doc) so the
documentation matches the new shape.

* fix(cli): restore "one-line" in user-facing recap copy

Verified from the Claude Code v2.1.113 binary that the slash-command
description IS literally "Generate a one-line session recap now" even
though the underlying prompt allows 1-2 sentences. Claude Code is
deliberately setting a tighter user expectation than the prompt
guarantees, which keeps the surface feel "glanceable".

Mirror that asymmetry: keep the prompt at 1-2 sentences (the previous
commit) for behavioral parity, but put "one-line" back in the user-
visible copy (slash-command description, settings description, user
docs). Internal design doc keeps the accurate "1-2 sentence" wording.

* fix(cli): render recap inline in history to match Claude Code

Earlier I read the user's complaint that the recap "scrolled away" as
"the recap should be sticky above the input box," and built a sticky
banner accordingly. Disassembly of the Claude Code v2.1.113 binary
shows the actual behavior is the opposite: their away_summary is a
plain `type:"system", subtype:"away_summary"` message dispatched
through the standard message renderer (no Static, no anchor, no
flexbox pinning) — it scrolls with the conversation like every other
system message.

Tear out the sticky-banner machinery so recap matches that:

- Recap is back in the `HistoryItemWithoutId` union and `addItem`'d
  into history (both from `/recap` and from auto-trigger), so it
  serializes into session saves and behaves like every other history
  item — no special clear paths, no resume-wrapper, no layout-effect
  re-measure dance.
- `useAwaySummary` takes `addItem` again instead of a setter callback.
- `AwayRecapMessage` renders the way Claude Code does: a 2-column
  gutter with `※`, then bold "recap: " and italic content, all in
  dim color. Drop the prior `StatusMessage`-shaped layout that fused
  prefix and label into "※ recap:".
- Remove the AppContainer plumbing, the slashCommandProcessor state,
  the UIStateContext fields, the DefaultAppLayout / ScreenReader
  placement blocks, the test-utils mocks, and the noninteractive
  stub. Restore `useResumeCommand.handleResume` to a void return
  since callers no longer need the success boolean.

Sweep the design doc so the architecture diagram, files table, and
hook deps reflect the inline-history flow.

* fix(cli): dedupe back-to-back auto-recaps with no new user turns between

Two consecutive blur cycles, each over the threshold but with no new
user activity in between, would each fire their own auto-recap and
add two near-duplicate entries to history (same task, slightly
different wording from temperature-driven LLM variance). Reported
case: leaving the terminal twice while a /review of one PR was
still on screen produced two recaps both about that same review.

Add a `shouldFireRecap` gate before kicking off the LLM call:

- Need at least 3 user messages in history total (don't fire on a
  near-empty session).
- If a previous away_recap is already in history, need at least 2
  new user messages since that one before another can fire.

Same shape as Claude Code's `Ic1` gate (`Sc1=3`, `Rc1=2`). Read
history through a ref so this isn't in the effect's deps and the
effect doesn't re-run on every message.

* fix(cli): type useResumeCommand.handleResume as Promise<void>

Per gemini review on #3482: the interface declared this as `() => void`
but the implementation is `async` and returns `Promise<void>`. The
mismatch silently lost the chainable promise — tests had to launder
it through `as unknown as Promise<void> | undefined` just to await.

Tighten the interface to `Promise<void>` and drop the cast in the
"closes the dialog immediately" test.

* fix(cli): persist auto-fired recap to chat recording so /resume keeps it

Per yiliang114 review on #3482: the manual `/recap` path persists across
`/resume` because the slash-command processor records every output
history item via `chatRecorder.recordSlashCommand({ phase: 'result',
outputHistoryItems })`, but the auto path called `addItem` directly
and bypassed that recorder. The result was an asymmetry where users
who triggered recap manually saw it after `/resume`, while users whose
recap fired automatically lost it.

Mirror the manual recording from useAwaySummary's `.then` callback —
record only the `result` phase (not invocation, since we don't want
a fake `> /recap` user line replayed) with the away-recap item as the
single output. Wrapped in try/catch because recap is best-effort and
must never surface a failure to the user.

Add useAwaySummary.test.ts covering:
- the recording path is taken on a successful auto-trigger
- the dedup gate (`shouldFireRecap`) suppresses the LLM call entirely,
  including the recording, when no new user turns happened since the
  last recap

* fix(cli): cast recap item via spread to satisfy strict tsc --build

CI's `tsc --build` (stricter than local `tsc --noEmit`) rejected the
direct `item as Record<string, unknown>` cast: HistoryItemAwayRecap's
literal `type: 'away_recap'` field doesn't overlap with `unknown`,
TS2352. Use the `{ ...item } as Record<string, unknown>` spread
pattern that the rest of the codebase (arenaCommand,
slashCommandProcessor's serializer) already uses for the same
SlashCommandRecordPayload field.
2026-04-21 14:39:13 +08:00

2030 lines
80 KiB
JSON

{
"$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
}