跳到正文
FunCoding

搜索

搜索文档、文章、Skill 和 MCP

Settings Reference

This reference lists user-configurable settings, their types, defaults, and purposes. Project settings override agent-directory settings. Resource lists are combined. See Configuration for file locations and trust behavior.

Model and thinking

SettingTypeDefaultDescription
defaultProviderstringAutomaticStartup AI provider.
defaultModelstringAutomaticStartup model ID.
defaultThinkingLevel"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max""medium"Startup thinking level.
modelThinkingLevelsobjectNonePer-model startup thinking levels keyed by exact provider/modelId.
thinkingBudgetsobjectBuilt-in budgetsToken budgets for minimal, low, medium, and high thinking levels.
enabledModelsstring[]All available modelsModel patterns used for startup selection and model cycling. Uses the same format as --models.
hideThinkingBlockbooleanfalseHide thinking blocks in the transcript.
showCacheMissNoticesbooleanfalseShow notices for significant cache misses, successful cache warming, compaction usage, and provider recovery.
cacheWarming"off" | "streaming" | "idle""streaming"Keep eligible provider prompt caches warm during active runs or, with "idle", between runs. Global setting only.

Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. /session shows the next decision; extensions can override it with cache_warming_decision. See Prompt Cache Lifetimes.

See Choose a Model for model selection and thinking controls.

Interaction

SettingTypeDefaultDescription
steeringMode"all" | "one-at-a-time""one-at-a-time"How queued steering messages are delivered.
followUpMode"all" | "one-at-a-time""one-at-a-time"How queued follow-up messages are delivered.
externalEditorstring$VISUAL, $EDITOR, then platform defaultCommand opened by the external-editor keybinding.
doubleEscapeAction"tree" | "fork" | "none""tree"Action for double Escape with an empty editor.
treeFilterMode"default" | "no-tools" | "user-only" | "labeled-only" | "all""default"Initial filter used by /tree.
defaultProjectTrust"ask" | "always" | "never""ask"Fallback project-trust behavior. Can only be set in agent-directory settings.

Tools

SettingTypeDefaultDescription
defaultToolsstring[]read, bash, edit, writeTools enabled at startup. Plain names replace the defaults; +name adds a tool and -name removes one. An empty array disables all built-in tools but not extension or SDK tools.
codemode.mode"on" | "only""on"How the codemode tool presents tools while it is active. on: declared tools get a note on calling them from scripts appended to their description, and codemode lists only tools that are not declared. only: codemode lists every tool scripts can call, and active built-in and extension tools are hidden from the model, so it reaches them through codemode.
codemode.inlineBudgetnumber3000Estimated tokens (characters / 4) the codemode tool's description may spend on tool declarations. Tools that do not fit are left out and found with searchTools(). 0 lists only namespaces.

Available built-in tools are read, bash, powershell, edit, write, grep, find, and ls. defaultTools can also name codemode and tool_search, which built-in extensions register inactive, and other extension tools registered inactive.

A list of only +name and -name entries changes the inherited selection instead of replacing it. For example, this enables codemode next to the default tools:

{
  "defaultTools": ["+codemode"]
}

This replaces bash with powershell and enables grep: ["-bash", "+powershell", "+grep"]. Project settings apply on top of user settings: a project list with only +name and -name entries changes the user's selection, and a project list with a plain name replaces it. In one list, plain names form the selection, and +name and -name then apply in order.

/reload enables tools newly added to defaultTools. It does not disable tools removed from it or re-enable unchanged tools you turned off. --tools with plain names, --no-tools, and --no-builtin-tools override defaultTools, also on reload.

CLI tool options override this setting for one invocation. --tools with only +name and -name entries changes the resolved defaultTools selection instead, for example pi --tools +codemode. On /reload, these entries apply to the reloaded setting too, so a tool removed with -name stays removed. See Command Line.

Sessions and context

SettingTypeDefaultDescription
sessionDirstringAgent session directorySession storage directory. Relative paths resolve from the working directory. PI_CODING_AGENT_SESSION_DIR and --session-dir override this setting.

Compaction

SettingTypeDefaultDescription
compaction.enabledbooleantrueEnable automatic compaction.
compaction.reserveTokensnumber16384Tokens reserved for the model response.
compaction.keepRecentTokensnumber20000Recent tokens retained without summarization.
compaction.modelOverridesobjectNonePer-model token settings keyed by exact provider/modelId.

Compaction token values must be non-negative safe integers. Each value resolves independently from the matching model override, then the ordinary compaction setting, then the built-in default. Project and user objects merge before model lookup.

See Compaction Reference for trigger, summarization, and validation behavior.

Branch summaries

SettingTypeDefaultDescription
branchSummary.reserveTokensnumber16384Tokens reserved when summarizing branch history.
branchSummary.skipPromptbooleanfalseSkip the branch-summary prompt and default to no summary.

Terminal and display

SettingTypeDefaultDescription
themestring"system"Built-in or custom theme name. system derives colors from the terminal theme.
quietStartupboolean | "header"falsetrue hides the startup header and loaded-resource listing. "header" keeps the header (version and key hints) but hides the model scope line and loaded-resource listing.
tuiMode"regular" | "fullscreen""fullscreen"Interactive terminal UI mode.
fullscreenExitOutput"transcript" | "resume-hint""transcript"Output printed when fullscreen mode exits.
fullscreenScrollbar"auto" | "always" | "hidden""auto"Fullscreen transcript scrollbar behavior.
fullscreenCopyOnSelectbooleantrueCopy selected text automatically in fullscreen mode.
fullscreenWheelScrollLines"auto" | number"auto"Lines per mouse-wheel event in fullscreen mode, from 1 to 100. "auto" moves one line per event in local macOS terminals, which already accelerate wheel and trackpad input; elsewhere, and over SSH, it speeds up fast wheel spins to at most 6 lines per event. Alt+wheel moves five times as far.
editorPaddingXnumber0Horizontal editor padding from 0 to 3 cells.
outputPad0 | 11Horizontal transcript padding for messages, tool output, ! command output, and summary blocks.
autocompleteMaxVisiblenumber5Visible autocomplete entries, from 3 to 20.
showHardwareCursorbooleanfalseUse the terminal cursor instead of Pi's drawn cursor. Pi still positions it for input methods.
terminal.showImagesbooleantrueDisplay inline images when supported.
terminal.imageWidthCellsnumber60Preferred inline image width in terminal cells.
terminal.clearOnShrinkbooleanfalseClear empty rows when rendered content shrinks.
terminal.showTerminalProgressbooleanfalseShow OSC 9;4 progress in the terminal tab.
terminal.hyperlinksboolean | "auto""auto"Override OSC 8 hyperlink detection.
terminal.images"kitty" | "iterm2" | "auto" | false"auto"Override inline-image protocol detection.
terminal.trueColorboolean | "auto""auto"Override true-color detection.
images.autoResizebooleantrueResize images to at most 2000 by 2000 pixels before sending them to a model.
images.blockImagesbooleanfalsePrevent images from being sent to models.
markdown.codeBlockIndentstring" "Prefix used to indent rendered code blocks.
markdown.mermaid"off" | "final" | "streaming""streaming"Mermaid rendering mode.

See Themes and Terminal Setup for format and platform details.

Network and retries

SettingTypeDefaultDescription
transport"auto" | "sse" | "websocket" | "websocket-cached""auto"Preferred transport for AI providers that support multiple transports.
httpProxystringNoneProxy URL applied as HTTP_PROXY and HTTPS_PROXY for Pi-managed HTTP clients. Can only be set in agent-directory settings.
httpIdleTimeoutMsnumber300000HTTP header and body idle timeout in milliseconds. Set to 0 to disable.
websocketConnectTimeoutMsnumber15000WebSocket connection timeout in milliseconds. Set to 0 to disable.
retry.enabledbooleantrueEnable automatic agent-level retry for transient failures.
retry.maxRetriesnumber3Maximum agent-level retry attempts.
retry.baseDelayMsnumber2000Initial exponential-backoff delay in milliseconds.
retry.maxAgentDelayMsnumber60000Maximum agent-level retry delay in milliseconds.
retry.provider.timeoutMsnumberhttpIdleTimeoutMsProvider request timeout in milliseconds.
retry.provider.maxRetriesnumber0Provider-level retry attempts.
retry.provider.maxRetryDelayMsnumber60000Maximum server-requested delay in milliseconds. Set to 0 to disable the limit.

Keep retry.provider.maxRetries at 0 unless provider-level retries are required. Provider retries can delay Pi from handling quota and usage-limit errors itself.

Shell

SettingTypeDefaultDescription
shellPathstringPlatform defaultCustom shell executable path. Supports a leading ~.
shellCommandPrefixstringNonePrefix prepended to every shell command.
npmCommandstring[]npmCommand and arguments used for npm package lookup and installation.

See Shell aliases for shell setup and Pi Packages for package-manager behavior.

Resources

Resource paths in user settings resolve from the agent directory. Paths in project settings resolve from the project .pi directory. Absolute paths and ~ are supported.

SettingTypeDefaultDescription
packagesarray[]npm, git, or local Pi package sources. See Pi Packages.
extensionsstring[][]Extension files or directories.
skillsstring[][]Skill files or directories.
promptsstring[][]Prompt-template files or directories.
themesstring[][]Theme files or directories.
enableSkillCommandsbooleantrueRegister skills as /skill:name commands.

Resource arrays support glob exclusions with !pattern, exact inclusion with +path, and exact exclusion with -path. Pi loads resources listed in both user-level and project settings.

The built-in extensions are named builtin:mcp, builtin:llama.cpp, builtin:codemode, and builtin:tool-search in extensions. They load by default; -builtin:mcp disables one. A +builtin:<name> or -builtin:<name> entry in project settings overrides the user setting. pi config lists them under Built-in. --no-extensions disables them too, and -e builtin:<name> loads one explicitly.

Updates, telemetry, and warnings

SettingTypeDefaultDescription
collapseChangelogbooleanfalseShow a condensed changelog after an update.
enableInstallTelemetrybooleantrueEnable anonymous install/update reporting and selected provider attribution headers. Does not control update checks.
enableAnalyticsbooleanfalseOpt in to analytics data sharing. Currently used only by the experimental first-run setup.
warnings.anthropicExtraUsagebooleantrueWarn when Anthropic subscription authentication may use paid extra usage.