Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Qwen Code CLI reference - Settings

Qwen Code settings.json settings

Qwen Code documents 103 settings keys, including general.preferredEditor, general.outputStyle and general.vimMode. These keys go in Qwen Code's settings.json and the other config files it reads. Each row gives the docs' description, accepted values and an example where one is documented.

Last verified 2 official pagesFull Qwen Code reference

Qwen Code settings keys
KeyDescription
general.preferredEditor

The preferred editor to open files in.

string; default undefined

Docs: general.preferredEditor
general.outputStyle

Name of the output style (built-in Concise, Proactive, Explanatory, Learning, or a custom style).

string; default undefined

Docs: general.outputStyle
general.vimMode

Enable Vim keybindings.

boolean; default false

Docs: general.vimMode
general.enableAutoUpdate

Enable automatic update checks and installations on startup.

boolean; default true

Docs: general.enableAutoUpdate
general.showSessionRecap

Auto-show a one-line "where you left off" recap when returning to the terminal.

boolean; default false

Docs: general.showSessionRecap
general.gitCoAuthor.commit

Add a Co-authored-by trailer and a per-file AI-attribution git note to commits made through Qwen Code.

boolean; default true

Docs: general.gitCoAuthor.commit
general.gitCoAuthor.pr

Append a Qwen Code attribution line to pull request descriptions when running gh pr create.

boolean; default true

Docs: general.gitCoAuthor.pr
general.language

Language for the user interface; "auto" detects from system settings. Requires restart.

enum; default "auto"

Docs: general.language
general.outputLanguage

Language for model output; "auto" detects from system settings. Requires restart.

string; default "auto"

Docs: general.outputLanguage
general.chatRecording

Save chat history to disk. Disabling this also prevents --continue and --resume from working.

boolean; default true

Docs: general.chatRecording
output.format

The format of the CLI output.

string; values "text", "json", "stream-json"; default "text"

Docs: output.format
review.effort

Default effort for /review when neither --effort nor a remembered level applies.

enum: low, medium, high, auto; default "auto"

Docs: review.effort
ui.theme

The color theme for the UI.

string; default "Qwen Dark"

Docs: ui.theme
ui.customThemes

Custom theme definitions.

object; default {}

Docs: ui.customThemes
ui.statusLine

Custom status line configuration (supports command, refreshInterval, respectUserColors, hideContextIndicator).

object; default undefined

Docs: ui.statusLine
ui.hideWindowTitle

Hide the window title bar.

boolean; default false

Docs: ui.hideWindowTitle
ui.hideTips

Hide all tips (startup and post-response) in the UI.

boolean; default false

Docs: ui.hideTips
ui.hideBanner

Hide the startup ASCII logo and info panel.

boolean; default false

Docs: ui.hideBanner
ui.showLineNumbers

Show line numbers in code blocks in the CLI output.

boolean; default true

Docs: ui.showLineNumbers
ui.renderMode

Default Markdown display mode: "render" for rich previews or "raw" for source-oriented Markdown.

string; default "render"

Docs: ui.renderMode
ui.enableWelcomeBack

Show welcome back dialog when returning to a project with conversation history.

boolean; default true

Docs: ui.enableWelcomeBack
ui.accessibility.screenReader

Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers.

boolean; default false

Docs: ui.accessibility.screenReader
ui.enableFollowupSuggestions

Enable followup suggestions that predict what you want to type next after the model responds.

boolean; default true

Docs: ui.enableFollowupSuggestions
ui.useTerminalBuffer

Render conversation history in an in-app scrollable viewport instead of the terminal scrollback buffer.

boolean; default true

Docs: ui.useTerminalBuffer
ui.mouseTracking

Enable in-app SGR mouse tracking.

boolean; default true

Docs: ui.mouseTracking
ide.enabled

Enable IDE integration mode.

boolean; default false

Docs: ide.enabled
privacy.usageStatisticsEnabled

Enable collection of usage statistics.

boolean; default true

Docs: privacy.usageStatisticsEnabled
model.name

The Qwen model to use for conversations.

string; default undefined

Docs: model.name
model.reasoningEffort

How hard reasoning-capable models think, applied across all providers; set with /effort.

enum: low, medium, high, xhigh, max; default undefined

Docs: model.reasoningEffort
model.sessionTokenLimit

Maximum recorded prompt token count allowed before sending the next message; -1 means unlimited.

number; default -1

Docs: model.sessionTokenLimit
model.maxSessionTurns

Maximum number of user/model/tool turns to keep in a session. -1 means unlimited.

integer; default -1

Docs: model.maxSessionTurns
model.maxWallTimeSeconds

Wall-clock budget for headless / unattended runs, in seconds; overridable via --max-wall-time.

number; default -1

Docs: model.maxWallTimeSeconds
model.maxToolCalls

Cumulative tool-call budget for a run; -1 unlimited, 0 no tool calls. Aborts with exit code 55.

number; default -1

Docs: model.maxToolCalls
model.maxSubagentDepth

Maximum sub-agent nesting depth (1-based levels); values clamp to 1-100.

number; default 5

Docs: model.maxSubagentDepth
model.generationConfig

Advanced overrides passed to the underlying content generator (timeout, maxRetries, samplingParams, etc.).

object; default undefined

Docs: model.generationConfig
model.enableOpenAILogging

Enables logging of OpenAI API calls for debugging and analysis.

boolean; default false

Docs: model.enableOpenAILogging
model.openAILoggingDir

Custom directory path for OpenAI API logs; defaults to logs/openai.

string; default undefined

Docs: model.openAILoggingDir
fastModel

Model used for generating prompt suggestions and speculative execution; empty uses the main model.

string; default ""

Docs: fastModel
advisorModel

Model used by /advisor for second-opinion reviews of the conversation.

string; default ""

Docs: advisorModel
visionModel

Image-capable model used as the vision bridge when a text-only main model receives an image.

string; default ""

Docs: visionModel
compactionModel

Model used for chat compression (auto-compaction). Leave empty to fall back to the main model.

string; default ""

Docs: compactionModel
imageModel

Model used by the built-in image_gen tool.

string; default ""

Docs: imageModel
voiceModel

Model used for voice transcription; voice dictation stays disabled until one is selected.

string; default ""

Docs: voiceModel
modelFallbacks

Ordered fallback model IDs (comma-separated, max 3) tried on capacity errors (429/503/529).

string; default ""

Docs: modelFallbacks
modelPricing

Optional per-model pricing for cost estimation in /stats model.

object; default undefined

Docs: modelPricing
context.fileName

The name of the context file(s).

string or array of strings; default undefined

Docs: context.fileName
context.autoCompactThreshold

Target fraction of the context window at which auto-compaction triggers.

number; default undefined (uses internal 0.85)

Docs: context.autoCompactThreshold
context.includeDirectories

Additional directories to include in the workspace context.

array; default []

Docs: context.includeDirectories
context.loadFromIncludeDirectories

Controls whether /memory refresh loads QWEN.md files from all added directories.

boolean; default false

Docs: context.loadFromIncludeDirectories
context.fileFiltering.respectGitIgnore

Respect .gitignore files when searching.

boolean; default true

Docs: context.fileFiltering.respectGitIgnore
context.fileFiltering.respectQwenIgnore

Respect .qwenignore and configured custom ignore files when searching.

boolean; default true

Docs: context.fileFiltering.respectQwenIgnore
context.fileFiltering.enableFuzzySearch

When true, enables fuzzy search capabilities when searching for files.

boolean; default true

Docs: context.fileFiltering.enableFuzzySearch
tools.sandbox

Sandbox execution environment (can be a boolean or a path string).

boolean or string; default undefined

Docs: tools.sandbox
tools.sandboxImage

Sandbox image URI used by Docker/Podman when --sandbox-image and QWEN_SANDBOX_IMAGE are unset.

string; default undefined

Docs: tools.sandboxImage
tools.shell.enableInteractiveShell

Use node-pty for an interactive shell experience.

boolean; default mode-based

Docs: tools.shell.enableInteractiveShell
tools.core

Deprecated. Will be removed in next version.

array of strings; default undefined

Docs: tools.core
tools.exclude

Deprecated. Use permissions.deny instead.

array of strings; default undefined

Docs: tools.exclude
tools.allowed

Deprecated. Use permissions.allow instead.

array of strings; default undefined

Docs: tools.allowed
tools.approvalMode

Sets the default approval mode for tool usage.

string; default auto

Docs: tools.approvalMode
tools.discoveryCommand

Command to run for tool discovery.

string; default undefined

Docs: tools.discoveryCommand
tools.callCommand

Command to run for calling a discovered tool.

string; default undefined

Docs: tools.callCommand
tools.useRipgrep

Use ripgrep for file content search instead of the fallback implementation.

boolean; default true

Docs: tools.useRipgrep
tools.workflowsEnabled

Enable the Workflow tool, which lets the model author and run scripts that orchestrate subagents.

boolean; default false

Docs: tools.workflowsEnabled
tools.truncateToolOutputThreshold

Truncate tool output if it is larger than this many characters.

number; default 25000

Docs: tools.truncateToolOutputThreshold
memory.enableManagedAutoMemory

Enable background extraction of memories from conversations.

boolean; default true

Docs: memory.enableManagedAutoMemory
memory.enableManagedAutoDream

Enable automatic consolidation (deduplication and cleanup) of collected memories.

boolean; default true

Docs: memory.enableManagedAutoDream
memory.enableTeamMemory

Enable a project memory tier shared with collaborators via the git-tracked .qwen/team-memory/ directory.

boolean; default false

Docs: memory.enableTeamMemory
permissions.allow

Rules for auto-approved tool calls (no confirmation needed).

array of strings; default undefined

Docs: permissions.allow
permissions.ask

Rules for tool calls that always require user confirmation. Takes priority over allow.

array of strings; default undefined

Docs: permissions.ask
permissions.deny

Rules for blocked tool calls. Highest priority - overrides both allow and ask.

array of strings; default undefined

Docs: permissions.deny
slashCommands.disabled

Slash command names to hide and refuse to execute.

array of strings; default undefined

Docs: slashCommands.disabled
skills.disabled

Hard-disabled skill names.

array of strings; default undefined

Docs: skills.disabled
skills.enabled

Explicit skill opt-ins; cancels a matching skills.defaultDisabled entry.

array of strings; default undefined

Docs: skills.enabled
mcp.serverCommand

Command to start an MCP server.

string; default undefined

Docs: mcp.serverCommand
mcp.allowed

An allowlist of MCP server names to make available to the model; supports glob patterns.

array of strings; default undefined

Docs: mcp.allowed
mcp.excluded

A denylist of MCP servers to exclude; a server in both lists is excluded.

array of strings; default undefined

Docs: mcp.excluded
mcp.toolIdleTimeoutMs

Idle timeout in milliseconds for MCP tool calls (10000 to 3600000).

number; default 300000

Docs: mcp.toolIdleTimeoutMs
security.folderTrust.enabled

Setting to track whether Folder trust is enabled.

boolean; default false

Docs: security.folderTrust.enabled
security.auth.selectedType

The currently selected authentication type.

string; default undefined

Docs: security.auth.selectedType
security.auth.enforcedType

The required auth type (useful for enterprises).

string; default undefined

Docs: security.auth.enforcedType
advanced.excludedEnvVars

Environment variables to exclude from project context.

array of strings; default ["DEBUG","DEBUG_MODE"]

Docs: advanced.excludedEnvVars
advanced.bugCommand

Configuration for the bug report command; overrides the default URL for /bug.

object; default undefined

Docs: advanced.bugCommand
plansDirectory

Custom directory for approved Plan Mode files (top-level key).

string; default undefined

Docs: plansDirectory
experimental.cron

Enable in-session cron/loop tools (cron_create, cron_list, cron_delete). Requires restart.

boolean; default true

Docs: experimental.cron
experimental.agentTeam

Enable agent-team collaboration tools for multi-agent coordination. Requires restart.

boolean; default false

Docs: experimental.agentTeam
mcpServers.<SERVER_NAME>.command

The command to execute to start the MCP server via standard I/O.

string; optional

Docs: mcpServers.<SERVER_NAME>.command
mcpServers.<SERVER_NAME>.args

Arguments to pass to the command.

array of strings; optional

Docs: mcpServers.<SERVER_NAME>.args
mcpServers.<SERVER_NAME>.env

Environment variables to set for the server process.

object; optional

Docs: mcpServers.<SERVER_NAME>.env
mcpServers.<SERVER_NAME>.cwd

The working directory in which to start the server.

string; optional

Docs: mcpServers.<SERVER_NAME>.cwd
mcpServers.<SERVER_NAME>.url

The URL of an MCP server that uses Server-Sent Events (SSE) for communication.

string; optional

Docs: mcpServers.<SERVER_NAME>.url
mcpServers.<SERVER_NAME>.httpUrl

The URL of an MCP server that uses streamable HTTP for communication.

string; optional

Docs: mcpServers.<SERVER_NAME>.httpUrl
mcpServers.<SERVER_NAME>.headers

A map of HTTP headers to send with requests to url or httpUrl.

object; optional

Docs: mcpServers.<SERVER_NAME>.headers
mcpServers.<SERVER_NAME>.timeout

Timeout in milliseconds for requests to this MCP server.

number; optional

Docs: mcpServers.<SERVER_NAME>.timeout
mcpServers.<SERVER_NAME>.trust

Trust this server and bypass its tool call confirmations in a trusted workspace.

boolean; optional

Docs: mcpServers.<SERVER_NAME>.trust
mcpServers.<SERVER_NAME>.includeTools

List of tool names to include from this MCP server (allowlist behavior).

array of strings; optional

Docs: mcpServers.<SERVER_NAME>.includeTools
mcpServers.<SERVER_NAME>.excludeTools

List of tool names to exclude from this MCP server.

array of strings; optional

Docs: mcpServers.<SERVER_NAME>.excludeTools
telemetry.enabled

Whether or not telemetry is enabled.

boolean

Docs: telemetry.enabled
telemetry.otlpEndpoint

The endpoint for the OTLP Exporter.

string

Docs: telemetry.otlpEndpoint
telemetry.otlpProtocol

The protocol for the OTLP Exporter (grpc or http).

string

Docs: telemetry.otlpProtocol
telemetry.logPrompts

Whether or not to include user prompt content and API request/response text in the logs.

boolean

Docs: telemetry.logPrompts
telemetry.outfile

Path to write telemetry to a file. When set, overrides OTLP export.

string

Docs: telemetry.outfile
modelProviders

Declares which models are available and how to connect to them; keys are API protocols (openai, anthropic, gemini).

Docs: modelProviders
env

Stores API keys directly in settings.json as a lowest-priority fallback (shell export and .env take precedence).

Docs: env

The rest of the Qwen Code reference

FAQ

How many settings keys does Qwen Code have?

The official Qwen Code docs list 103 settings keys, including general.preferredEditor, general.outputStyle and general.vimMode. All of them are in the table above, in the docs' order.

What does general.preferredEditor do in Qwen Code?

The preferred editor to open files in. Values: string; default undefined.

Where are Qwen Code settings keys documented?

On 2 official docs pages at qwenlm.github.io, last read on October 17, 2026. Every row in the table links the exact section it came from.

Sources

Last verified . Names and examples are copied verbatim from the 2 official pages below, and every row above links the exact section it came from.

Newsletter

Know when your tools change

One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.