@earendil-works/pi-coding-agent 0.87.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +25 -711
- package/dist/bundle/chunks/{anthropic-messages-MYU5ZMRF.js → anthropic-messages-J5WXPPPC.js} +1 -1
- package/dist/bundle/chunks/{chunk-GV2E3GBU.js → chunk-65HAU2C5.js} +1 -1
- package/dist/bundle/chunks/{chunk-4DKZACXI.js → chunk-OJP47DM6.js} +13 -13
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{openai-completions-XHML6MTL.js → openai-completions-OBX42CLD.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-BNWPZYDH.js → virtual-modules-VHMJYYWQ.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +14 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +9 -9
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +268 -0
- package/docs/compaction.md +22 -22
- package/docs/configuration.md +45 -0
- package/docs/containerization.md +109 -82
- package/docs/custom-provider.md +132 -784
- package/docs/docs.json +139 -99
- package/docs/environment-variables.md +3 -5
- package/docs/extensions.md +134 -3020
- package/docs/how-pi-works.md +49 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/index.md +24 -69
- package/docs/json.md +193 -65
- package/docs/keybindings.md +57 -102
- package/docs/llama-cpp.md +3 -3
- package/docs/message-types.md +261 -0
- package/docs/models.md +55 -565
- package/docs/packages.md +66 -167
- package/docs/prompt-templates.md +31 -68
- package/docs/providers.md +102 -240
- package/docs/quickstart.md +61 -106
- package/docs/rpc-commands.md +854 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +129 -1556
- package/docs/sdk.md +76 -1171
- package/docs/security.md +70 -32
- package/docs/session-format.md +10 -214
- package/docs/sessions.md +35 -141
- package/docs/settings.md +109 -387
- package/docs/shell-aliases.md +85 -5
- package/docs/skills.md +51 -190
- package/docs/slash-commands.md +60 -0
- package/docs/terminal-setup.md +105 -78
- package/docs/termux.md +74 -83
- package/docs/themes.md +68 -280
- package/docs/tmux.md +31 -39
- package/docs/tui.md +69 -923
- package/docs/usage.md +54 -272
- package/docs/windows.md +43 -17
- package/examples/README.md +13 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +25 -5
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +20 -20
- package/package.json +8 -8
- package/docs/development.md +0 -90
package/docs/settings.md
CHANGED
|
@@ -1,428 +1,150 @@
|
|
|
1
|
-
# Settings
|
|
1
|
+
# Settings Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This reference lists user-configurable settings, their types, defaults, and purposes. Project settings override agent-directory settings. Resource lists are combined. See [Configuration](configuration.md) for file locations and trust behavior.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|----------|-------|
|
|
7
|
-
| `~/.pi/agent/settings.json` | Global (all projects) |
|
|
8
|
-
| `.pi/settings.json` | Project (current directory) |
|
|
5
|
+
## Model and thinking
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Project Trust
|
|
13
|
-
|
|
14
|
-
On interactive startup, pi asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
|
|
15
|
-
|
|
16
|
-
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
|
-
|
|
18
|
-
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
|
|
19
|
-
|
|
20
|
-
`pi config` and package commands use the same project trust flow, except `pi update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
|
-
|
|
22
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
|
|
23
|
-
|
|
24
|
-
## All Settings
|
|
25
|
-
|
|
26
|
-
### Model & Thinking
|
|
7
|
+
<a id="model-cycling"></a>
|
|
27
8
|
|
|
28
9
|
| Setting | Type | Default | Description |
|
|
29
|
-
|
|
30
|
-
| `defaultProvider` | string |
|
|
31
|
-
| `defaultModel` | string |
|
|
32
|
-
| `defaultThinkingLevel` |
|
|
33
|
-
| `modelThinkingLevels` | object |
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
|
|
39
|
-
#### Cache Warming
|
|
40
|
-
|
|
41
|
-
Providers drop a prompt cache entry after a period of inactivity, so the first request after a pause pays full input price again. Cache warming re-sends the last request with a one-token output budget shortly before expiry:
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| `defaultProvider` | string | Automatic | Startup AI provider. |
|
|
12
|
+
| `defaultModel` | string | Automatic | Startup model ID. |
|
|
13
|
+
| `defaultThinkingLevel` | `"off" \| "minimal" \| "low" \| "medium" \| "high" \| "xhigh" \| "max"` | `"medium"` | Startup thinking level. |
|
|
14
|
+
| `modelThinkingLevels` | object | None | Per-model startup thinking levels keyed by exact `provider/modelId`. |
|
|
15
|
+
| `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
|
|
16
|
+
| `enabledModels` | `string[]` | All available models | Model patterns used for startup selection and model cycling. Uses the same format as `--models`. |
|
|
17
|
+
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
|
|
18
|
+
| `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
|
|
19
|
+
| `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"streaming"` | Keep eligible provider prompt caches warm during active runs or, with `"idle"`, between runs. Global setting only. |
|
|
42
20
|
|
|
43
|
-
- `
|
|
44
|
-
- `"streaming"` protects expensive prefixes during long tool executions and stops as soon as the agent settles.
|
|
45
|
-
- `"idle"` also considers refreshes while waiting for your next prompt, using a fixed 15% continuation probability measured from real usage.
|
|
21
|
+
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](models.md#prompt-cache-lifetimes).
|
|
46
22
|
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
"cacheWarming": "idle"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
23
|
+
See [Choose a Model](models.md) for model selection and thinking controls.
|
|
52
24
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Warming stops when the context changes (model switch, compaction, branch navigation). Idle warming stops no later than 30 minutes after the last real provider request; warming during an active agent run stops after 60 minutes. Extensions can override each decision through the [`cache_warming_decision`](extensions.md#cache_warming_decision) event.
|
|
56
|
-
|
|
57
|
-
Each refresh is billed as a cache read of the full context plus one output token. Usage and cost show up in session totals but never enter model context. Pi schedules candidates at 90% of the cache lifetime while leaving at least ten seconds before expiry.
|
|
58
|
-
|
|
59
|
-
Warming needs a known cache lifetime for the model and the retention tier the request used (`short`, or `long` with `PI_CACHE_RETENTION=long`). The built-in catalog carries lifetimes for direct Anthropic; custom models and other providers can declare theirs with `promptCache` in `models.json` (see [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes)). Claude models that use budget-based rather than adaptive thinking are skipped while thinking is on, because Anthropic derives the thinking budget from `max_tokens` and keys the message cache on it, so a one-token request cannot reproduce the entry.
|
|
60
|
-
|
|
61
|
-
#### thinkingBudgets
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"thinkingBudgets": {
|
|
66
|
-
"minimal": 1024,
|
|
67
|
-
"low": 4096,
|
|
68
|
-
"medium": 10240,
|
|
69
|
-
"high": 32768
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### UI & Display
|
|
25
|
+
## Interaction
|
|
75
26
|
|
|
76
27
|
| Setting | Type | Default | Description |
|
|
77
|
-
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
87
|
-
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
88
|
-
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
89
|
-
| `outputPad` | number | `1` | Horizontal padding for user messages, assistant messages, and thinking (0 or 1) |
|
|
90
|
-
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
91
|
-
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
92
|
-
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
93
|
-
| `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
|
|
94
|
-
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling or while the pointer is over its rightmost-column track, `"always"` reserves that column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
95
|
-
| `fullscreenCopyOnSelect` | boolean | `true` | Automatically copy selected text in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection |
|
|
96
|
-
|
|
97
|
-
For VS Code, include `--wait` so pi resumes after the editor exits:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"externalEditor": "code --wait"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Telemetry and update checks
|
|
106
|
-
|
|
107
|
-
`enableInstallTelemetry` controls the anonymous install/update ping to `https://pi.dev/api/report-install` and Pi attribution headers for OpenRouter, NVIDIA NIM, and Cloudflare provider requests. Opting out disables both. It does not disable update checks; Pi can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
|
|
108
|
-
|
|
109
|
-
Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
110
|
-
|
|
111
|
-
### Network
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `steeringMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued steering messages are delivered. |
|
|
30
|
+
| `followUpMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued follow-up messages are delivered. |
|
|
31
|
+
| `externalEditor` | string | `$VISUAL`, `$EDITOR`, then platform default | Command opened by the external-editor keybinding. |
|
|
32
|
+
| `doubleEscapeAction` | `"tree" \| "fork" \| "none"` | `"tree"` | Action for double Escape with an empty editor. |
|
|
33
|
+
| `treeFilterMode` | `"default" \| "no-tools" \| "user-only" \| "labeled-only" \| "all"` | `"default"` | Initial filter used by `/tree`. |
|
|
34
|
+
| `defaultProjectTrust` | `"ask" \| "always" \| "never"` | `"ask"` | Fallback project-trust behavior. **Can only be set in agent-directory settings.** |
|
|
35
|
+
|
|
36
|
+
## Tools
|
|
112
37
|
|
|
113
38
|
| Setting | Type | Default | Description |
|
|
114
|
-
|
|
115
|
-
| `
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `defaultTools` | `string[]` | `read`, `bash`, `edit`, `write` | Built-in tools enabled at startup. An empty array disables all built-in tools but not extension or SDK tools. |
|
|
116
41
|
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
"httpProxy": "http://127.0.0.1:7890"
|
|
120
|
-
}
|
|
121
|
-
```
|
|
42
|
+
Available built-in tools are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`. CLI tool options override this setting for one invocation. See [Command Line](cli.md#tools).
|
|
122
43
|
|
|
123
|
-
|
|
44
|
+
## Sessions and context
|
|
124
45
|
|
|
125
46
|
| Setting | Type | Default | Description |
|
|
126
|
-
|
|
127
|
-
| `
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"warnings": {
|
|
132
|
-
"anthropicExtraUsage": false
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| `sessionDir` | string | Agent session directory | Session storage directory. Relative paths resolve from the working directory. `PI_CODING_AGENT_SESSION_DIR` and `--session-dir` override this setting. |
|
|
136
49
|
|
|
137
50
|
### Compaction
|
|
138
51
|
|
|
139
52
|
| Setting | Type | Default | Description |
|
|
140
|
-
|
|
141
|
-
| `compaction.enabled` | boolean | `true` | Enable
|
|
142
|
-
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for
|
|
143
|
-
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens
|
|
144
|
-
| `compaction.modelOverrides` | object |
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"compaction": {
|
|
149
|
-
"enabled": true,
|
|
150
|
-
"reserveTokens": 16384,
|
|
151
|
-
"keepRecentTokens": 20000
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
#### Per-model compaction overrides
|
|
157
|
-
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"compaction": {
|
|
161
|
-
"enabled": true,
|
|
162
|
-
"reserveTokens": 16384,
|
|
163
|
-
"keepRecentTokens": 20000,
|
|
164
|
-
"modelOverrides": {
|
|
165
|
-
"some-provider/big-model": {
|
|
166
|
-
"reserveTokens": 400000
|
|
167
|
-
},
|
|
168
|
-
"local/small-model": {
|
|
169
|
-
"reserveTokens": 2048,
|
|
170
|
-
"keepRecentTokens": 4096
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Keys match exact, case-sensitive `provider/modelId` values, not names or glob patterns. Model IDs may contain slashes (for example, `openrouter/anthropic/claude-sonnet-4`).
|
|
178
|
-
|
|
179
|
-
Each token setting resolves independently: matching model override → ordinary `compaction` setting → built-in default. In the example, `some-provider/big-model` keeps the ordinary 20000 recent tokens. Token values must be non-negative safe integers. Invalid values in the matching model override produce an error when read; only omitted fields fall back to the ordinary setting. Model override entries must be objects. Invalid ordinary token settings produce an error when read, even if the active model has a valid override. Only omitted ordinary values use built-in defaults. Zero is accepted, but `reserveTokens: 0` leaves no response margin and also sets the summarization output budget to zero.
|
|
180
|
-
|
|
181
|
-
Global and project settings merge recursively **before** model lookup. A project can override one field for a model without replacing its other fields or other models. A global model-specific value takes precedence over a project-wide fallback; override the same model entry in the project to change it.
|
|
182
|
-
|
|
183
|
-
`enabled` is not model-specific. The active model's token settings apply to manual compaction, automatic threshold checks (including between assistant turns), and overflow recovery. Switching models takes effect on the next check or compaction. Configure overrides in JSON; `/settings` retains the ordinary auto-compaction toggle.
|
|
184
|
-
|
|
185
|
-
See [compaction.md](compaction.md) for trigger and summarization behavior.
|
|
186
|
-
|
|
187
|
-
### Branch Summary
|
|
188
|
-
|
|
189
|
-
| Setting | Type | Default | Description |
|
|
190
|
-
|---------|------|---------|-------------|
|
|
191
|
-
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when selecting branch history; output is capped at 4096 tokens |
|
|
192
|
-
| `branchSummary.skipPrompt` | boolean | `false` | Skip "Summarize branch?" prompt on `/tree` navigation (defaults to no summary) |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| `compaction.enabled` | boolean | `true` | Enable automatic compaction. |
|
|
55
|
+
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for the model response. |
|
|
56
|
+
| `compaction.keepRecentTokens` | number | `20000` | Recent tokens retained without summarization. |
|
|
57
|
+
| `compaction.modelOverrides` | object | None | Per-model token settings keyed by exact `provider/modelId`. |
|
|
193
58
|
|
|
194
|
-
|
|
59
|
+
<a id="per-model-compaction-overrides"></a>
|
|
195
60
|
|
|
196
|
-
|
|
197
|
-
|---------|------|---------|-------------|
|
|
198
|
-
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry on transient errors |
|
|
199
|
-
| `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts |
|
|
200
|
-
| `retry.baseDelayMs` | number | `2000` | Base delay for agent-level exponential backoff (2s, 4s, 8s) |
|
|
201
|
-
| `retry.maxAgentDelayMs` | number | `60000` | Max agent-level retry delay (60s) |
|
|
202
|
-
| `retry.provider.timeoutMs` | number | SDK default | Provider/SDK request timeout in milliseconds |
|
|
203
|
-
| `retry.provider.maxRetries` | number | `0` | Provider/SDK retry attempts |
|
|
204
|
-
| `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-requested delay before failing (60s) |
|
|
205
|
-
|
|
206
|
-
Agent-level retries use exponential backoff capped by `retry.maxAgentDelayMs`, so long retry runs stay responsive after prolonged outages.
|
|
207
|
-
|
|
208
|
-
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs`, the request fails immediately with an informative error instead of waiting silently. Set it to `0` to disable the limit.
|
|
209
|
-
|
|
210
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before Pi sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"retry": {
|
|
215
|
-
"enabled": true,
|
|
216
|
-
"maxRetries": 3,
|
|
217
|
-
"baseDelayMs": 2000,
|
|
218
|
-
"maxAgentDelayMs": 60000,
|
|
219
|
-
"provider": {
|
|
220
|
-
"timeoutMs": 3600000,
|
|
221
|
-
"maxRetries": 0,
|
|
222
|
-
"maxRetryDelayMs": 60000
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Message Delivery
|
|
61
|
+
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.
|
|
229
62
|
|
|
230
|
-
|
|
231
|
-
|---------|------|---------|-------------|
|
|
232
|
-
| `steeringMode` | string | `"one-at-a-time"` | How steering messages are sent: `"all"` or `"one-at-a-time"` |
|
|
233
|
-
| `followUpMode` | string | `"one-at-a-time"` | How follow-up messages are sent: `"all"` or `"one-at-a-time"` |
|
|
234
|
-
| `transport` | string | `"auto"` | Preferred transport for providers that support multiple transports: `"sse"`, `"websocket"`, `"websocket-cached"`, or `"auto"` |
|
|
235
|
-
| `httpIdleTimeoutMs` | number | `300000` | HTTP header/body idle timeout in milliseconds, also used by providers with explicit stream idle timeouts. Set to `0` to disable. |
|
|
236
|
-
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connect/open handshake timeout in milliseconds for providers that support WebSocket transports. Set to `0` to disable. |
|
|
63
|
+
See [Compaction Reference](compaction.md) for trigger, summarization, and validation behavior.
|
|
237
64
|
|
|
238
|
-
###
|
|
65
|
+
### Branch summaries
|
|
239
66
|
|
|
240
67
|
| Setting | Type | Default | Description |
|
|
241
|
-
|
|
242
|
-
| `
|
|
243
|
-
| `
|
|
244
|
-
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when content shrinks (can cause flicker) |
|
|
245
|
-
| `terminal.hyperlinks` | boolean or `"auto"` | `"auto"` | Override OSC 8 hyperlink support (advanced, JSON-only) |
|
|
246
|
-
| `terminal.images` | string or boolean | `"auto"` | Override image protocol support with `"kitty"`, `"iterm2"`, `false`, or `"auto"` (advanced, JSON-only) |
|
|
247
|
-
| `terminal.trueColor` | boolean or `"auto"` | `"auto"` | Override truecolor support (advanced, JSON-only) |
|
|
248
|
-
| `images.autoResize` | boolean | `true` | Resize images to 2000x2000 max. Applies to `@file` attachments, `read`, and images returned by tools |
|
|
249
|
-
| `images.blockImages` | boolean | `false` | Block all images from being sent to LLM |
|
|
250
|
-
|
|
251
|
-
### Shell
|
|
252
|
-
|
|
253
|
-
| Setting | Type | Default | Description |
|
|
254
|
-
|---------|------|---------|-------------|
|
|
255
|
-
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows); supports a leading `~` for the home directory |
|
|
256
|
-
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
257
|
-
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
258
|
-
|
|
259
|
-
Windows paths in JSON must use forward slashes or escaped backslashes:
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when summarizing branch history. |
|
|
70
|
+
| `branchSummary.skipPrompt` | boolean | `false` | Skip the branch-summary prompt and default to no summary. |
|
|
260
71
|
|
|
261
|
-
|
|
262
|
-
{
|
|
263
|
-
"shellPath": "C:/Program Files/Git/bin/bash.exe"
|
|
264
|
-
}
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
```json
|
|
268
|
-
{
|
|
269
|
-
"shellPath": "C:\\Program Files\\Git\\bin\\bash.exe"
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
```json
|
|
274
|
-
{
|
|
275
|
-
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.pi/agent/npm/`; project-scoped npm packages install under `.pi/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
280
|
-
|
|
281
|
-
### Tools
|
|
72
|
+
## Terminal and display
|
|
282
73
|
|
|
283
74
|
| Setting | Type | Default | Description |
|
|
284
|
-
|
|
285
|
-
| `
|
|
286
|
-
|
|
287
|
-
`
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| `theme` | string | Detected | Built-in or custom theme name. |
|
|
77
|
+
| `quietStartup` | boolean | `false` | Hide the startup header. |
|
|
78
|
+
| `tuiMode` | `"regular" \| "fullscreen"` | `"regular"` | Interactive terminal UI mode. |
|
|
79
|
+
| `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
|
|
80
|
+
| `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
|
|
81
|
+
| `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. |
|
|
82
|
+
| `editorPaddingX` | number | `0` | Horizontal editor padding from 0 to 3 cells. |
|
|
83
|
+
| `outputPad` | `0 \| 1` | `1` | Horizontal transcript padding. |
|
|
84
|
+
| `autocompleteMaxVisible` | number | `5` | Visible autocomplete entries, from 3 to 20. |
|
|
85
|
+
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while Pi positions it for input methods. |
|
|
86
|
+
| `terminal.showImages` | boolean | `true` | Display inline images when supported. |
|
|
87
|
+
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
|
|
88
|
+
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
|
|
89
|
+
| `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
|
|
90
|
+
| `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
|
|
91
|
+
| `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
|
|
92
|
+
| `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override true-color detection. |
|
|
93
|
+
| `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. |
|
|
94
|
+
| `images.blockImages` | boolean | `false` | Prevent images from being sent to models. |
|
|
95
|
+
| `markdown.codeBlockIndent` | string | `" "` | Prefix used to indent rendered code blocks. |
|
|
96
|
+
| `markdown.mermaid` | `"off" \| "final" \| "streaming"` | `"streaming"` | Mermaid rendering mode. |
|
|
97
|
+
|
|
98
|
+
See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
|
|
99
|
+
|
|
100
|
+
## Network and retries
|
|
306
101
|
|
|
307
102
|
| Setting | Type | Default | Description |
|
|
308
|
-
|
|
309
|
-
| `
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
|
|
105
|
+
| `httpProxy` | string | None | Proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY` for Pi-managed HTTP clients. **Can only be set in agent-directory settings.** |
|
|
106
|
+
| `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
|
|
107
|
+
| `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
|
|
108
|
+
| `retry.enabled` | boolean | `true` | Enable automatic agent-level retry for transient failures. |
|
|
109
|
+
| `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts. |
|
|
110
|
+
| `retry.baseDelayMs` | number | `2000` | Initial exponential-backoff delay in milliseconds. |
|
|
111
|
+
| `retry.maxAgentDelayMs` | number | `60000` | Maximum agent-level retry delay in milliseconds. |
|
|
112
|
+
| `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Provider request timeout in milliseconds. |
|
|
113
|
+
| `retry.provider.maxRetries` | number | `0` | Provider-level retry attempts. |
|
|
114
|
+
| `retry.provider.maxRetryDelayMs` | number | `60000` | Maximum server-requested delay in milliseconds. Set to `0` to disable the limit. |
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
## Shell
|
|
318
119
|
|
|
319
120
|
| Setting | Type | Default | Description |
|
|
320
|
-
|
|
321
|
-
| `
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
|
|
123
|
+
| `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
|
|
124
|
+
| `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
|
|
322
125
|
|
|
323
|
-
|
|
324
|
-
{
|
|
325
|
-
"enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
|
|
326
|
-
}
|
|
327
|
-
```
|
|
126
|
+
See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
|
|
328
127
|
|
|
329
|
-
|
|
128
|
+
## Resources
|
|
330
129
|
|
|
331
|
-
|
|
332
|
-
|---------|------|---------|-------------|
|
|
333
|
-
| `markdown.codeBlockIndent` | string | `" "` | Indentation for code blocks |
|
|
334
|
-
| `markdown.mermaid` | string | `"streaming"` | Mermaid rendering mode: `"off"`, `"final"`, or `"streaming"` |
|
|
130
|
+
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.
|
|
335
131
|
|
|
336
|
-
|
|
132
|
+
| Setting | Type | Default | Description |
|
|
133
|
+
|---|---|---|---|
|
|
134
|
+
| `packages` | array | `[]` | npm, git, or local Pi package sources. See [Pi Packages](packages.md). |
|
|
135
|
+
| `extensions` | `string[]` | `[]` | Extension files or directories. |
|
|
136
|
+
| `skills` | `string[]` | `[]` | Skill files or directories. |
|
|
137
|
+
| `prompts` | `string[]` | `[]` | Prompt-template files or directories. |
|
|
138
|
+
| `themes` | `string[]` | `[]` | Theme files or directories. |
|
|
139
|
+
| `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands. |
|
|
337
140
|
|
|
338
|
-
|
|
141
|
+
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.
|
|
339
142
|
|
|
340
|
-
|
|
143
|
+
## Updates, telemetry, and warnings
|
|
341
144
|
|
|
342
145
|
| Setting | Type | Default | Description |
|
|
343
|
-
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
348
|
-
| `themes` | string[] | `[]` | Local theme file paths or directories |
|
|
349
|
-
| `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands |
|
|
350
|
-
|
|
351
|
-
Arrays support glob patterns and exclusions. Use `!pattern` to exclude. Use `+path` to force-include an exact path and `-path` to force-exclude an exact path.
|
|
352
|
-
|
|
353
|
-
#### packages
|
|
354
|
-
|
|
355
|
-
String form loads all resources from a package:
|
|
356
|
-
|
|
357
|
-
```json
|
|
358
|
-
{
|
|
359
|
-
"packages": ["pi-skills", "@org/my-extension"]
|
|
360
|
-
}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
Object form filters which resources to load:
|
|
364
|
-
|
|
365
|
-
```json
|
|
366
|
-
{
|
|
367
|
-
"packages": [
|
|
368
|
-
{
|
|
369
|
-
"source": "pi-skills",
|
|
370
|
-
"skills": ["brave-search", "transcribe"],
|
|
371
|
-
"extensions": []
|
|
372
|
-
}
|
|
373
|
-
]
|
|
374
|
-
}
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
See [packages.md](packages.md) for package management details.
|
|
378
|
-
|
|
379
|
-
## Example
|
|
380
|
-
|
|
381
|
-
```json
|
|
382
|
-
{
|
|
383
|
-
"defaultProvider": "anthropic",
|
|
384
|
-
"defaultModel": "claude-sonnet-4-20250514",
|
|
385
|
-
"defaultThinkingLevel": "medium",
|
|
386
|
-
"modelThinkingLevels": {
|
|
387
|
-
"anthropic/claude-sonnet-4-20250514": "high"
|
|
388
|
-
},
|
|
389
|
-
"theme": "dark",
|
|
390
|
-
"compaction": {
|
|
391
|
-
"enabled": true,
|
|
392
|
-
"reserveTokens": 16384,
|
|
393
|
-
"keepRecentTokens": 20000
|
|
394
|
-
},
|
|
395
|
-
"retry": {
|
|
396
|
-
"enabled": true,
|
|
397
|
-
"maxRetries": 3
|
|
398
|
-
},
|
|
399
|
-
"enabledModels": ["claude-*", "gpt-4o"],
|
|
400
|
-
"warnings": {
|
|
401
|
-
"anthropicExtraUsage": true
|
|
402
|
-
},
|
|
403
|
-
"packages": ["pi-skills"]
|
|
404
|
-
}
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
## Project Overrides
|
|
408
|
-
|
|
409
|
-
Project settings (`.pi/settings.json`) override global settings. Nested objects are merged:
|
|
410
|
-
|
|
411
|
-
```json
|
|
412
|
-
// ~/.pi/agent/settings.json (global)
|
|
413
|
-
{
|
|
414
|
-
"theme": "dark",
|
|
415
|
-
"compaction": { "enabled": true, "reserveTokens": 16384 }
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// .pi/settings.json (project)
|
|
419
|
-
{
|
|
420
|
-
"compaction": { "reserveTokens": 8192 }
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
// Result
|
|
424
|
-
{
|
|
425
|
-
"theme": "dark",
|
|
426
|
-
"compaction": { "enabled": true, "reserveTokens": 8192 }
|
|
427
|
-
}
|
|
428
|
-
```
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
|
|
148
|
+
| `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
|
|
149
|
+
| `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
|
|
150
|
+
| `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
|