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
| Key | Description |
|---|---|
general.preferredEditor | The preferred editor to open files in. string; default |
general.outputStyle | Name of the output style (built-in Concise, Proactive, Explanatory, Learning, or a custom style). string; default |
general.vimMode | Enable Vim keybindings. boolean; default |
general.enableAutoUpdate | Enable automatic update checks and installations on startup. boolean; default |
general.showSessionRecap | Auto-show a one-line "where you left off" recap when returning to the terminal. boolean; default |
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 |
general.gitCoAuthor.pr | Append a Qwen Code attribution line to pull request descriptions when running boolean; default |
general.language | Language for the user interface; enum; default |
general.outputLanguage | Language for model output; string; default |
general.chatRecording | Save chat history to disk. Disabling this also prevents --continue and --resume from working. boolean; default |
output.format | The format of the CLI output. string; values |
review.effort | Default effort for /review when neither --effort nor a remembered level applies. enum: low, medium, high, auto; default |
ui.theme | The color theme for the UI. string; default |
ui.customThemes | Custom theme definitions. object; default |
ui.statusLine | Custom status line configuration (supports command, refreshInterval, respectUserColors, hideContextIndicator). object; default |
ui.hideWindowTitle | Hide the window title bar. boolean; default |
ui.hideTips | Hide all tips (startup and post-response) in the UI. boolean; default |
ui.hideBanner | Hide the startup ASCII logo and info panel. boolean; default |
ui.showLineNumbers | Show line numbers in code blocks in the CLI output. boolean; default |
ui.renderMode | Default Markdown display mode: string; default |
ui.enableWelcomeBack | Show welcome back dialog when returning to a project with conversation history. boolean; default |
ui.accessibility.screenReader | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. boolean; default |
ui.enableFollowupSuggestions | Enable followup suggestions that predict what you want to type next after the model responds. boolean; default |
ui.useTerminalBuffer | Render conversation history in an in-app scrollable viewport instead of the terminal scrollback buffer. boolean; default |
ui.mouseTracking | Enable in-app SGR mouse tracking. boolean; default |
ide.enabled | Enable IDE integration mode. boolean; default |
privacy.usageStatisticsEnabled | Enable collection of usage statistics. boolean; default |
model.name | The Qwen model to use for conversations. string; default |
model.reasoningEffort | How hard reasoning-capable models think, applied across all providers; set with /effort. enum: low, medium, high, xhigh, max; default |
model.sessionTokenLimit | Maximum recorded prompt token count allowed before sending the next message; -1 means unlimited. number; default |
model.maxSessionTurns | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited. integer; default |
model.maxWallTimeSeconds | Wall-clock budget for headless / unattended runs, in seconds; overridable via --max-wall-time. number; default |
model.maxToolCalls | Cumulative tool-call budget for a run; -1 unlimited, 0 no tool calls. Aborts with exit code 55. number; default |
model.maxSubagentDepth | Maximum sub-agent nesting depth (1-based levels); values clamp to 1-100. number; default |
model.generationConfig | Advanced overrides passed to the underlying content generator (timeout, maxRetries, samplingParams, etc.). object; default |
model.enableOpenAILogging | Enables logging of OpenAI API calls for debugging and analysis. boolean; default |
model.openAILoggingDir | Custom directory path for OpenAI API logs; defaults to logs/openai. string; default |
fastModel | Model used for generating prompt suggestions and speculative execution; empty uses the main model. string; default |
advisorModel | Model used by /advisor for second-opinion reviews of the conversation. string; default |
visionModel | Image-capable model used as the vision bridge when a text-only main model receives an image. string; default |
compactionModel | Model used for chat compression (auto-compaction). Leave empty to fall back to the main model. string; default |
imageModel | Model used by the built-in string; default |
voiceModel | Model used for voice transcription; voice dictation stays disabled until one is selected. string; default |
modelFallbacks | Ordered fallback model IDs (comma-separated, max 3) tried on capacity errors (429/503/529). string; default |
modelPricing | Optional per-model pricing for cost estimation in object; default |
context.fileName | The name of the context file(s). string or array of strings; default |
context.autoCompactThreshold | Target fraction of the context window at which auto-compaction triggers. number; default |
context.includeDirectories | Additional directories to include in the workspace context. array; default |
context.loadFromIncludeDirectories | Controls whether boolean; default |
context.fileFiltering.respectGitIgnore | Respect .gitignore files when searching. boolean; default |
context.fileFiltering.respectQwenIgnore | Respect .qwenignore and configured custom ignore files when searching. boolean; default |
context.fileFiltering.enableFuzzySearch | When boolean; default |
tools.sandbox | Sandbox execution environment (can be a boolean or a path string). boolean or string; default |
tools.sandboxImage | Sandbox image URI used by Docker/Podman when --sandbox-image and QWEN_SANDBOX_IMAGE are unset. string; default |
tools.shell.enableInteractiveShell | Use boolean; default mode-based Docs: tools.shell.enableInteractiveShell |
tools.core | Deprecated. Will be removed in next version. array of strings; default |
tools.exclude | Deprecated. Use array of strings; default |
tools.allowed | Deprecated. Use array of strings; default |
tools.approvalMode | Sets the default approval mode for tool usage. string; default |
tools.discoveryCommand | Command to run for tool discovery. string; default |
tools.callCommand | Command to run for calling a discovered tool. string; default |
tools.useRipgrep | Use ripgrep for file content search instead of the fallback implementation. boolean; default |
tools.workflowsEnabled | Enable the Workflow tool, which lets the model author and run scripts that orchestrate subagents. boolean; default |
tools.truncateToolOutputThreshold | Truncate tool output if it is larger than this many characters. number; default |
memory.enableManagedAutoMemory | Enable background extraction of memories from conversations. boolean; default |
memory.enableManagedAutoDream | Enable automatic consolidation (deduplication and cleanup) of collected memories. boolean; default |
memory.enableTeamMemory | Enable a project memory tier shared with collaborators via the git-tracked .qwen/team-memory/ directory. boolean; default |
permissions.allow | Rules for auto-approved tool calls (no confirmation needed). array of strings; default |
permissions.ask | Rules for tool calls that always require user confirmation. Takes priority over array of strings; default |
permissions.deny | Rules for blocked tool calls. Highest priority - overrides both array of strings; default |
slashCommands.disabled | Slash command names to hide and refuse to execute. array of strings; default |
skills.disabled | Hard-disabled skill names. array of strings; default |
skills.enabled | Explicit skill opt-ins; cancels a matching skills.defaultDisabled entry. array of strings; default |
mcp.serverCommand | Command to start an MCP server. string; default |
mcp.allowed | An allowlist of MCP server names to make available to the model; supports glob patterns. array of strings; default |
mcp.excluded | A denylist of MCP servers to exclude; a server in both lists is excluded. array of strings; default |
mcp.toolIdleTimeoutMs | Idle timeout in milliseconds for MCP tool calls (10000 to 3600000). number; default |
security.folderTrust.enabled | Setting to track whether Folder trust is enabled. boolean; default |
security.auth.selectedType | The currently selected authentication type. string; default |
security.auth.enforcedType | The required auth type (useful for enterprises). string; default |
advanced.excludedEnvVars | Environment variables to exclude from project context. array of strings; default |
advanced.bugCommand | Configuration for the bug report command; overrides the default URL for /bug. object; default |
plansDirectory | Custom directory for approved Plan Mode files (top-level key). string; default |
experimental.cron | Enable in-session cron/loop tools (cron_create, cron_list, cron_delete). Requires restart. boolean; default |
experimental.agentTeam | Enable agent-team collaboration tools for multi-agent coordination. Requires restart. boolean; default |
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 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 ( 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.