Skip to Content
User GuideSettings reference

Settings reference

This page covers common and advanced user settings. See settings for file selection, precedence, and trust. Dots in a key represent nested objects; do not write a dotted key as a literal top-level JSON property.

{ "ui": { "showLineNumbers": true }, "general": { "plan": { "enabled": true } } }

Defaults describe source definitions; unset values may be resolved by the host, model, or runtime policy. Restart the process after changing fields marked for restart. outputStyle applies to the next conversation; use /clear or /new.

Models and behavior

KeyTypeDefaultRestartPurpose
model.namestringUnset / runtime-dependentNoThe model to use for conversations.
model.reasoningEffortenumUnset / runtime-dependentNoDeprecated: migrated into model.preferences[modelId].reasoning.effort. Explicit reasoning effort for models that support effort levels.
model.contextWindownumberUnset / runtime-dependentNoDeprecated: migrated into model.preferences[modelId].contextWindow. Explicit context window in tokens for models that support context window options.
outputStylestringUnset / runtime-dependentYesActive output style name. Applies on top of the mandatory identity guards — it can only extend the system prompt, not replace it.
languagestringUnset / runtime-dependentYesPreferred language for AI responses (e.g., “Chinese”, “Japanese”, “Spanish”). Leave empty for default (English).
agent’string’ as constUnset / runtime-dependentYesName of an agent to use for the main thread. When set, the main session uses this agent’s system prompt, tools, and model configuration.
general.maxAttemptsnumberProvided by CLI hostNoMaximum main-model request attempts, including the initial attempt.
general.retryFetchErrorsbooleantrueNoRetry on “exception TypeError: fetch failed sending request” errors.
output.formatenumtextNoThe format of the CLI output. Can be text or json.
autoMemoryEnabledbooleanUnset / runtime-dependentYesAutomatically save and load reusable information for the current project. When unset, it is on in interactive sessions; headless runs keep it off unless QWEN_MEMORY_HEADLESS=1 is set.
autoMemoryUserScopeEnabledbooleanUnset / runtime-dependentYesAutomatically save and load reusable information shared across projects. When unset, it is on in interactive sessions; headless runs keep it off unless QWEN_MEMORY_HEADLESS=1 is set.

Permissions and trust

KeyTypeDefaultRestartPurpose
general.defaultPermissionModestringdefaultNoDefault tool permission mode: default, accept_edits, auto, bypass_permissions or dont_ask. Legacy aliases are accepted for compatibility.
security.folderTrust.enabledbooleantrueYesSetting to track whether Folder trust is enabled.
security.disableYoloModebooleanfalseYesDisable bypass permissions mode, even if enabled by a flag.
permissions.additionalDirectoriesarray[]NoAdditional workspace directories trusted for file access in the project.
permissions.trustDirectoriesarray[]NoExplicitly trusted directories stored at user scope.
security.enableAllExternalImportsbooleanfalseYesAutomatically approve all external @import references in AGENTS.md files, even when they point outside the project root.
security.approvedExternalImportProjectsarray[]YesList of project directories where external @import references in AGENTS.md files have been approved.
security.environmentVariableRedaction.enabledbooleanfalseYesEnable redaction of environment variables that may contain secrets.
security.environmentVariableRedaction.allowedarray[]YesEnvironment variables to always allow (bypass redaction).
security.environmentVariableRedaction.blockedarray[]YesEnvironment variables to always redact.

Context and workspaces

KeyTypeDefaultRestartPurpose
context.fileNamestringAGENTS.mdNoThe name of the context file or files to load into memory. Accepts either a single string or an array of strings.
context.discoveryMaxDirsnumber200NoMaximum number of directories to search for memory.
context.memoryBoundaryMarkersarray['.git']YesStop upward AGENTS.md discovery at a directory containing a boundary marker. An empty array disables parent traversal.
context.loadMemoryFromIncludeDirectoriesbooleanfalseNoLoad AGENTS.md from trusted additional workspace directories at startup.
context.fileFiltering.respectGitIgnorebooleantrueYesRespect .gitignore files when searching.
context.fileFiltering.respectBrandIgnorebooleantrueYesRespect .qwenignore when searching.
context.fileFiltering.customIgnoreFilePathsarray[]YesAdditional ignore files, with earlier entries taking precedence over later entries, .qwenignore and .gitignore.
agentsMdExcludesarray[]YesGlob patterns or absolute paths excluding project/local instruction files; global and extension instructions are unaffected.
worktree.baseRefstring'fresh'Yesfresh starts from the origin default branch; head inherits the requesting checkout HEAD, not its uncommitted changes.
worktree.sparsePathsarray[]YesRepository-relative sparse-checkout cone paths. An empty list checks out the full tree. Requires Git 2.27 or later.
worktree.symlinkDirectoriesarray[]YesRepository-relative real directories to symlink from the main checkout. Escaping or invalid paths are skipped.
general.fileCheckpointing.enabledbooleantrueYesEnable file checkpointing for code rewind
general.plan.enabledbooleantrueYesEnable Plan Mode for read-only safety during planning. When disabled, /plan command and —permission-mode plan are both rejected.
general.plan.directorystringUnset / runtime-dependentYesThe directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode.

Tools and extensions

KeyTypeDefaultRestartPurpose
tools.corearrayUnset / runtime-dependentYesRestrict built-in tools to an allowlist; omitted tools are denied.
tools.excludearrayUnset / runtime-dependentYesTool names to exclude.
tools.shell.pagerstring'cat'NoThe pager command to use for shell output. Defaults to cat.
tools.shell.showColorbooleantrueNoShow color in shell output.
tools.shell.inactivityTimeoutnumber300NoThe maximum time in seconds allowed without output from the shell command. Defaults to 5 minutes.
tools.useRipgrepbooleantrueNoUse ripgrep for file content search instead of the fallback implementation. Provides faster search performance.
mcp.allowedarrayUnset / runtime-dependentYesA list of MCP servers to allow.
mcp.excludedarrayUnset / runtime-dependentYesA list of MCP servers to exclude.
mcp.enableAllProjectMcpServersbooleanfalseYesAutomatically approve all project-level MCP servers.
mcp.enabledProjectMcpServersarray[]YesList of approved project-level MCP server names.
mcp.disabledProjectMcpServersarray[]YesList of rejected project-level MCP server names.
mcp.lazyLoadbooleanfalseYesExpose MCP discovery and invocation through meta tools when CodeMode is off. CodeMode uses its own discovery path.
skills.enabledbooleantrueYesEnable Agent Skills.
skills.loadFromAgentsDirectorybooleantrueYesLoad skills from legacy .agents/skills directories for this session. The user source is shared across sessions; trusted project settings can enable it when needed. SDK mode defaults this off unless explicitly enabled. Restart the CLI after changing this setting.
skills.disabledarray[]YesList of disabled skills.
skills.disableShellExecutionbooleanfalseNoDisable shell injection in user Skill prompts; built-in and managed Skills are unaffected.
plugins.enabledarray[]YesDeprecated: use top-level enabledPlugins instead. Retained for migration only.
plugins.disabledarray[]YesDeprecated: use top-level enabledPlugins with value false instead. Retained for migration only.
plugins.autoUpdatebooleantrueNoAutomatically refresh eligible marketplace data and update already-installed plugins in the background. Declared marketplace source changes are still reconciled.
disableAllHooksbooleanfalseNoWhen true, all hooks and statusLine execution are disabled regardless of individual settings. Top-level kill switch.
allowedHttpHookUrlsarrayUnset / runtime-dependentYesAllowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard. Undefined allows all URLs; an empty array blocks all HTTP hooks.
hooksConfig.enabledbooleantrueYesCanonical toggle for the hooks system. When disabled, no hooks will be executed.
hooksConfig.notificationsbooleanfalseNoShow hook lifecycle messages (started/completed/progress) in chat history. Hook failures are always shown regardless of this setting.
hooksConfig.headlessFastModebooleanfalseYesSkip user hooks in headless mode. This can bypass user-defined audit or policy hooks.
experimental.enableAgentsbooleantrueYesEnable subagents.

Terminal appearance

KeyTypeDefaultRestartPurpose
ui.languageenumenNoLanguage used by the interactive interface.
ui.themestring'auto'NoThe color theme for the UI, or auto to follow the terminal background color. See the CLI themes guide for available options.
ui.autoThemeSwitchingbooleantrueNoRe-check the terminal background color while running and update the theme when ui.theme is auto. Disable to resolve the theme once at startup and then hold it.
general.preferredEditorstringUnset / runtime-dependentNoThe preferred editor to open files in.
general.vimModebooleanfalseNoEnable Vim keybindings
ui.hideWindowTitlebooleanfalseYesHide the window title bar
ui.inlineThinkingModeenumfullNoDisplay model thinking inline: off or full.
ui.showShortcutsHintbooleantrueNoShow the ”? for shortcuts” hint above the input.
ui.compactToolOutputbooleantrueNoDisplay tool outputs (like directory listings and file reads) in a compact, structured format.
ui.copyFullResponsebooleanfalseNoSkip the /copy picker and always copy the full assistant response.
ui.hideBannerbooleanfalseNoHide the application banner
ui.hideContextSummarybooleanfalseNoHide the context summary above the input.
ui.hideFooterbooleanfalseNoDeprecated and ignored. Retained so existing settings files keep validating; the legacy footer is retired.
ui.showLineNumbersbooleantrueNoShow line numbers in the chat.
ui.renderMermaidbooleantrueNoRender complete Mermaid code blocks as text diagrams.
ui.errorVerbosityenumlowNoControls whether recoverable errors are hidden (low) or fully shown (full).
ui.accessibility.screenReaderbooleanfalseYesRender output in plain-text to be more screen reader accessible
statusLine.typestringcommandNoThe type of status line. Currently only “command” is supported.
statusLine.commandstring""NoShell command to execute for the status line. Receives JSON session data on stdin. Output (including ANSI colors) is displayed below the input prompt.
statusLine.paddingnumber0NoHorizontal padding (in characters) applied to the status line output.

Updates and data

KeyTypeDefaultRestartPurpose
general.enableAutoUpdatebooleantrueNoEnable automatic updates.
general.enableAutoUpdateNotificationbooleantrueNoEnable update notification prompts.
general.enableNotificationsbooleanfalseNoEnable run-event notifications for action-required prompts and session completion.
privacy.usageStatisticsEnabledbooleantrueNoShare usage data; false enables Privacy Mode, not a complete telemetry shutdown.
general.sessionRetention.enabledbooleanfalseNoEnable automatic cleanup of sessions and associated tool outputs (disabled by default). Diagnostic logs are cleaned independently after 30 days.
general.sessionRetention.maxAgestring'30d'NoAutomatically delete chats older than this time period (e.g., “30d”, “7d”, “24h”, “1w”)
general.sessionRetention.maxCountnumberUnset / runtime-dependentNoMaximum number of count-limited cleanup targets to keep. Transcript JSONL files ignore this setting and are deleted only by maxAge.
general.sessionRetention.minRetentionstringProvided by CLI hostNoMinimum retention period used as a deletion safety limit.
advanced.useProxyFromEnvironmentbooleantrueYesWhether the CLI, including SDK integrations, automatically uses HTTPS_PROXY, https_proxy, HTTP_PROXY, or http_proxy when no explicit startup proxy is supplied.
advanced.excludedEnvVarsarray['DEBUG', 'DEBUG_MODE']NoEnvironment variables withheld from MCP servers started by qwen mcp list. Sessions and .env loading do not use this setting.

Structured configuration and advanced boundaries

providers, mcpServers, hooks, permissions, marketplace entries, and agent definitions have structured formats. Use the examples in models, MCP, hooks, permissions, plugins, and subagents.

The settings schema is defined in the source file packages/resource/src/settings/settingsSchema.ts, including host integrations, compatibility fields, and experiments. (schemas/settings.schema.json in the source repository is generated for a different product build; do not use it for Qwen Code.) A schema entry does not establish a stable public feature contract. Do not copy unknown internal settings to bypass feature restrictions. Model overrides, team protocols, debugging, and runtime-injected fields are outside this page’s user configuration contract.

Last updated on