Pi Agent Configuration Reference Manual
The following is a quick reference table for Pi Agent settings.json configuration items.
This table includes common configuration items; a few JSON-specific advanced keys (such as tuiMode, fullscreen series, terminal.hyperlinks, markdown.mermaid, etc.) are not listed individually.
Config file locations
Configuration is divided into two levels: global and project; project configuration is loaded only after project trust is obtained.
| File path | Scope | Description |
|---|---|---|
| ~/.pi/agent/settings.json | Global (all projects) | General configuration effective for all projects |
| .pi/settings.json | Project-level | Loaded only after the project is trusted, overriding same-named keys in the global configuration |
Models and reasoning
This section's configuration determines the default provider, model, and reasoning effort.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| defaultProvider | string | Optional | None (set initially via /login or /model) | Default provider, such as "anthropic" or "openai" |
| defaultModel | string | Optional | None (set initially via /login or /model) | Default model ID, such as "claude-sonnet-4-20250514" |
| defaultThinkingLevel | string | Optional | None (not specified in the documentation) | Default reasoning level: off/minimal/low/medium/high/xhigh/max |
| modelThinkingLevels | object | Optional | None | Set the startup reasoning level per model using "provider/modelId" |
| hideThinkingBlock | boolean | Optional | false | Hide the reasoning process |
| showCacheMissNotices | boolean | Optional | false | Show cache miss notifications |
| thinkingBudgets | object | Optional | None (no custom budget enabled) | Customize the token budget for each level |
| warnings.anthropicExtraUsage | boolean | Optional | true | Notify when an Anthropic subscription may incur paid extra usage |
UI and Display
This section's configuration controls interface appearance, the external editor, and display density.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| theme | string | Optional | "dark" | Theme name |
| externalEditor | string | Optional | Checks $VISUAL, then $EDITOR in order; otherwise Windows uses Notepad and other systems use nano | External editor command (explicit configuration takes precedence over environment variables) |
| quietStartup | boolean | Optional | false | Hide the startup header |
| defaultProjectTrust | string | Optional | "ask" | Default project trust behavior: "ask" (prompt), "always" (auto-trust), "never" (auto-reject); only global configuration applies |
| collapseChangelog | boolean | Optional | false | Collapse the changelog |
| enableInstallTelemetry | boolean | Optional | true | Anonymous installation statistics |
| enableAnalytics | boolean | Optional | false | User analytics (must be explicitly enabled) |
| doubleEscapeAction | string | Optional | "tree" | The action triggered by double-pressing Escape; by default opens the session tree browser |
| treeFilterMode | string | Optional | "default" | /tree default filter mode: default/no-tools/user-only/labeled-only/all |
| editorPaddingX | number | Optional | 0 | Editor horizontal padding (0-3) |
| outputPad | number | Optional | 1 | Message padding (0 or 1) |
| autocompleteMaxVisible | number | Optional | 5 | Maximum autocomplete entries (3-20) |
the web
This section's configuration is for proxy access in restricted network environments.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| httpProxy | string | Optional | None (no proxy used) | HTTP proxy (global only) |
httpProxy Only global configuration applies; setting it in project-level configuration has no effect.
When a proxy is needed, write ~/.pi/agent/settings.json。
Compaction
This section's configuration controls when automatic context compaction triggers and what is retained.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| compaction.enabled | boolean | Optional | true | Automatic compaction |
| compaction.reserveTokens | number | Optional | 16384 | Tokens reserved for the LLM response |
| compaction.keepRecentTokens | number | Optional | 20000 | Recent tokens retained |
Branch summaries
This section's configuration controls whether to generate summaries of abandoned branches when jumping between session trees.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| branchSummary.reserveTokens | number | Optional | 16384 | Tokens reserved for summaries |
| branchSummary.skipPrompt | boolean | Optional | false | Skip the summary prompt |
Retry
This section's configuration controls automatic retry behavior after a request fails.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| retry.enabled | boolean | Optional | true | Automatic retry |
| retry.maxRetries | number | Optional | 3 | Maximum number of retries |
| retry.baseDelayMs | number | Optional | 2000 | Base delay (ms) |
| retry.provider.timeoutMs | number | Optional | SDK default | Request timeout |
| retry.provider.maxRetries | number | Optional | 0 | Provider-level retry count |
| retry.provider.maxRetryDelayMs | number | Optional | 60000 | Maximum retry delay |
Message delivery
This section's configuration determines how steer and follow-up messages are inserted, and which transport protocol is used.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| steeringMode | string | Optional | "one-at-a-time" | Steer message policy: "all" (insert all steer messages immediately) or "one-at-a-time" (insert one by one) |
| followUpMode | string | Optional | "one-at-a-time" | Follow-up message policy |
| transport | string | Optional | "auto" | Transport protocol: sse / websocket / websocket-cached / auto |
| httpIdleTimeoutMs | number | Optional | 300000 | HTTP idle timeout |
| websocketConnectTimeoutMs | number | Optional | 15000 | WebSocket connection timeout |
Terminal and Images
This section's configuration controls image display size and sending behavior in the terminal.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| terminal.showImages | boolean | Optional | true | Show images in the terminal |
| terminal.imageWidthCells | number | Optional | 60 | Image width (cells) |
| terminal.clearOnShrink | boolean | Optional | false | Clear blank lines when content shrinks |
| images.autoResize | boolean | Optional | true | Automatic image scaling |
| images.blockImages | boolean | Optional | false | Prevent images from being sent to the LLM |
Shell
This section's configuration customizes the shell and npm wrappers used when executing commands.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| shellPath | string | Optional | None (use the system default shell) | Custom shell path |
| shellCommandPrefix | string | Optional | None (no prefix added) | Command prefix |
| npmCommand | string[] | Optional | None (call npm directly) | npm command wrapper |
Built-in Tools
This section's configuration controls which built-in tools are enabled by default at startup.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| defaultTools | string[] | Optional | None (use the built-in default tool set) | Initially enabled built-in tools; possible values read/bash/powershell/edit/write/grep/find/ls, where powershell is only available on Windows |
This setting only affects built-in tools; custom tools registered by extensions and the SDK are unaffected.
The project-level defaultTools array replaces the global array entirely.
Model Cycling and Resources
This section's configuration manages the Ctrl+P model cycling range and the load paths for resources such as extensions and Skills.
| Configuration Item | Type | Required | Default value | Description |
|---|---|---|---|---|
| enabledModels | string[] | Optional | None (all available models) | Models available to Ctrl+P |
| packages | array (mix of strings and objects) | Optional | [] | Package source; a string loads all resources, while an object uses fields such as {source, skills, extensions} to filter |
| extensions | string[] | Optional | [] | Extension paths |
| skills | string[] | Optional | [] | Skill paths |
| prompts | string[] | Optional | [] | Prompt template paths |
| themes | string[] | Optional | [] | Theme paths |
| enableSkillCommands | boolean | Optional | true | Register /skill:name commands |
| sessionDir | string | Optional | None (use ~/.pi/agent/sessions/) | Session storage directory |