/settings for common options.
Settings Files
- Global Settings
- Project Settings
Location:
~/.pi/agent/settings.jsonApplies to all projects and sessions.Merging Behavior
Project settings override global settings. Nested objects are merged:Model & Thinking
string
Default provider (e.g.,
"anthropic", "openai")string
Default model ID
string
Default thinking level:
"off", "minimal", "low", "medium", "high", "xhigh"boolean
default:"false"
Hide thinking blocks in output
object
Custom token budgets per thinking level
UI & Display
string
default:"dark"
Theme name (
"dark", "light", or custom theme)boolean
default:"false"
Hide startup header
boolean
default:"false"
Show condensed changelog after updates
string
default:"tree"
Action for double-escape:
"tree", "fork", or "none"number
default:"0"
Horizontal padding for input editor (0-3)
number
default:"5"
Max visible items in autocomplete dropdown (3-20)
boolean
default:"false"
Show terminal hardware cursor
Compaction
boolean
default:"true"
Enable automatic compaction
number
default:"16384"
Tokens reserved for LLM response
number
default:"20000"
Recent tokens to keep (not summarized)
Branch Summary
number
default:"16384"
Tokens reserved for branch summarization when switching branches via
/treeRetry
boolean
default:"true"
Enable automatic retry on transient errors
number
default:"3"
Maximum retry attempts
number
default:"2000"
Base delay for exponential backoff (2s, 4s, 8s)
number
default:"60000"
Max server-requested delay before failing (60s)When a provider requests a retry delay longer than this (e.g., “quota resets in 5 hours”), the request fails immediately with an informative error. Set to
0 to disable the cap.Message Delivery
string
default:"one-at-a-time"
How steering messages are sent:
"all" or "one-at-a-time"string
default:"one-at-a-time"
How follow-up messages are sent:
"all" or "one-at-a-time"string
default:"sse"
Preferred transport:
"sse", "websocket", or "auto"For providers that support multiple transports.Terminal & Images
boolean
default:"true"
Show images in terminal (if supported)
boolean
default:"false"
Clear empty rows when content shrinks (can cause flicker)
boolean
default:"true"
Resize images to 2000x2000 max before sending
boolean
default:"false"
Block all images from being sent to LLM
Shell
string
Custom shell path (e.g., for Cygwin on Windows)
string
Prefix for every bash command (e.g.,
"shopt -s expand_aliases")Useful for loading shell configuration:Model Cycling
string[]
Model patterns for Ctrl+P cycling (same format as Use wildcards to match multiple models. Ctrl+P cycles through matched models.
--models CLI flag)Markdown
string
default:" "
Indentation for code blocks (default: two spaces)
Resources
These settings define where to load extensions, skills, prompts, and themes.Path Resolution
- Paths in
~/.pi/agent/settings.jsonresolve relative to~/.pi/agent - Paths in
.pi/settings.jsonresolve relative to.pi - Absolute paths and
~are supported
Packages
array
default:"[]"
npm/git packages to load resources fromString form (loads all resources):Object form (filters resources):
Extensions
string[]
default:"[]"
Local extension file paths or directories
Skills
string[]
default:"[]"
Local skill file paths or directories
boolean
default:"true"
Register skills as
/skill:name commandsPrompts
string[]
default:"[]"
Local prompt template paths or directories
Themes
string[]
default:"[]"
Local theme file paths or directories
Glob Patterns
Arrays support glob patterns and exclusions:pattern- Glob match!pattern- Exclude matches+path- Force-include exact path-path- Force-exclude exact path
Complete Example
$schema field enables editor auto-completion and validation.
Interactive Settings
Use/settings to modify common options in interactive mode:
- Change thinking level
- Switch themes
- Configure message delivery
- Set transport preference
- Toggle compaction
- And more…
Keybindings
Customize keyboard shortcuts via~/.pi/agent/keybindings.json:
interrupt,clear,exit,suspendcycleThinkingLevelcycleModelForward,cycleModelBackward,selectModelexpandTools,toggleThinkingexternalEditorfollowUp,dequeuepasteImagenewSession,tree,fork,resume
- Standard text editing actions (see
packages/tuidocumentation)
packages/coding-agent/src/core/keybindings.ts.
Environment Variables
Example:
Next Steps
Extensions
Build TypeScript extensions
Skills
Create Agent Skills
Prompt Templates
Make reusable prompts
Themes
Customize colors
Pi Packages
Share via npm/git
CLI Reference
All CLI flags