1---
2title: AI Agent Settings - Zed
3description: "Customize Zed's AI agent: default models, temperature, tool approval, auto-run commands, notifications, and panel options."
4---
5
6# Agent Settings
7
8Settings for Zed's Agent Panel, including model selection, UI preferences, and tool permissions.
9
10## Model Settings {#model-settings}
11
12### Default Model {#default-model}
13
14If you're using [Zed's hosted LLM service](./subscription.md), it sets `claude-sonnet-4-5` as the default model for agentic work (agent panel, inline assistant) and `gpt-5-nano` as the default "fast" model (thread summarization, git commit messages). If you're not subscribed or want to change these defaults, you can manually edit the `default_model` object in your settings:
15
16```json [settings]
17{
18 "agent": {
19 "default_model": {
20 "provider": "openai",
21 "model": "gpt-4o"
22 }
23 }
24}
25```
26
27### Feature-specific Models {#feature-specific-models}
28
29You can assign distinct and specific models for the following AI-powered features:
30
31- Thread summary model: Used for generating thread summaries
32- Inline assistant model: Used for the inline assistant feature
33- Commit message model: Used for generating Git commit messages
34
35```json [settings]
36{
37 "agent": {
38 "default_model": {
39 "provider": "zed.dev",
40 "model": "claude-sonnet-4-5"
41 },
42 "inline_assistant_model": {
43 "provider": "anthropic",
44 "model": "claude-3-5-sonnet"
45 },
46 "commit_message_model": {
47 "provider": "openai",
48 "model": "gpt-4o-mini"
49 },
50 "thread_summary_model": {
51 "provider": "google",
52 "model": "gemini-2.0-flash"
53 }
54 }
55}
56```
57
58> If a custom model isn't set for one of these features, they automatically fall back to using the default model.
59
60### Alternative Models for Inline Assists {#alternative-assists}
61
62With the Inline Assistant in particular, you can send the same prompt to multiple models at once.
63
64Here's how you can customize your settings file ([how to edit](../configuring-zed.md#settings-files)) to add this functionality:
65
66```json [settings]
67{
68 "agent": {
69 "default_model": {
70 "provider": "zed.dev",
71 "model": "claude-sonnet-4-5"
72 },
73 "inline_alternatives": [
74 {
75 "provider": "zed.dev",
76 "model": "gpt-5-mini"
77 }
78 ]
79 }
80}
81```
82
83When multiple models are configured, you'll see in the Inline Assistant UI buttons that allow you to cycle between outputs generated by each model.
84
85The models you specify here are always used in _addition_ to your [default model](#default-model).
86
87For example, the following configuration will generate three outputs for every assist.
88One with Claude Sonnet 4.5 (the default model), another with GPT-5-mini, and another one with Gemini 3 Flash.
89
90```json [settings]
91{
92 "agent": {
93 "default_model": {
94 "provider": "zed.dev",
95 "model": "claude-sonnet-4-5"
96 },
97 "inline_alternatives": [
98 {
99 "provider": "zed.dev",
100 "model": "gpt-5-mini"
101 },
102 {
103 "provider": "zed.dev",
104 "model": "gemini-3-flash"
105 }
106 ]
107 }
108}
109```
110
111### Model Temperature
112
113Specify a custom temperature for a provider and/or model:
114
115```json [settings]
116{
117 "agent": {
118 "model_parameters": [
119 // To set parameters for all requests to OpenAI models:
120 {
121 "provider": "openai",
122 "temperature": 0.5
123 },
124 // To set parameters for all requests in general:
125 {
126 "temperature": 0
127 },
128 // To set parameters for a specific provider and model:
129 {
130 "provider": "zed.dev",
131 "model": "claude-sonnet-4-5",
132 "temperature": 1.0
133 }
134 ]
135 }
136}
137```
138
139## Agent Panel Settings {#agent-panel-settings}
140
141Note that some of these settings are also surfaced in the Agent Panel's settings UI, which you can access either via the `agent: open settings` action or by the dropdown menu on the top-right corner of the panel.
142
143### Font Size
144
145Use the `agent_ui_font_size` setting to change the font size of rendered agent responses in the panel.
146
147```json [settings]
148{
149 "agent_ui_font_size": 18
150}
151```
152
153> Editors in the Agent Panelβsuch as the main message textareaβuse monospace fonts and are controlled by `agent_buffer_font_size` (which defaults to `buffer_font_size` when unset).
154
155### Default Tool Permissions
156
157> **Note:** In Zed v0.224.0 and above, tool approval uses the `agent.tool_permissions` settings described below.
158
159The `agent.tool_permissions.default` setting controls the baseline tool approval behavior for Zed's native agent:
160
161- `"confirm"` (default) β Prompts for approval before running any tool action
162- `"allow"` β Auto-approves tool actions without prompting
163- `"deny"` β Blocks all tool actions
164
165```json [settings]
166{
167 "agent": {
168 "tool_permissions": {
169 "default": "confirm"
170 }
171 }
172}
173```
174
175Even with `"default": "allow"`, per-tool `always_deny` and `always_confirm` patterns are still respected, so you can auto-approve most actions while keeping guardrails on dangerous or sensitive ones.
176
177### Per-tool Permission Rules {#per-tool-permission-rules}
178
179For granular control over individual tool actions, use the `tools` key inside `tool_permissions` to configure regex-based rules that auto-approve, auto-deny, or always require confirmation for specific inputs.
180
181Each tool entry supports the following keys:
182
183- `default` β Fallback when no patterns match: `"confirm"`, `"allow"`, or `"deny"`
184- `always_allow` β Array of patterns that auto-approve matching actions
185- `always_deny` β Array of patterns that block matching actions immediately
186- `always_confirm` β Array of patterns that always prompt for confirmation
187
188```json [settings]
189{
190 "agent": {
191 "tool_permissions": {
192 "default": "allow",
193 "tools": {
194 "terminal": {
195 "default": "confirm",
196 "always_allow": [
197 { "pattern": "^cargo\\s+(build|test|check)" },
198 { "pattern": "^git\\s+(status|log|diff)" }
199 ],
200 "always_deny": [{ "pattern": "rm\\s+-rf\\s+(/|~)" }],
201 "always_confirm": [{ "pattern": "sudo\\s" }]
202 },
203 "edit_file": {
204 "always_deny": [
205 { "pattern": "\\.env" },
206 { "pattern": "\\.(pem|key)$" }
207 ]
208 }
209 }
210 }
211 }
212}
213```
214
215#### Pattern Precedence
216
217When evaluating a tool action, rules are checked in the following order (highest priority first):
218
2191. **Built-in security rules** β Hardcoded protections (e.g., `rm -rf /`) that cannot be overridden
2202. **`always_deny`** β Blocks matching actions immediately
2213. **`always_confirm`** β Requires confirmation for matching actions
2224. **`always_allow`** β Auto-approves matching actions. For the terminal tool with chained commands (e.g., `echo hello && rm file`), **all** sub-commands must match an `always_allow` pattern
2235. **Tool-specific `default`** β Per-tool fallback when no patterns match (e.g., `tools.terminal.default`)
2246. **Global `default`** β Falls back to `tool_permissions.default`
225
226#### Case Sensitivity
227
228Patterns are **case-insensitive** by default. To make a pattern case-sensitive, set `case_sensitive` to `true`:
229
230```json [settings]
231{
232 "agent": {
233 "tool_permissions": {
234 "tools": {
235 "edit_file": {
236 "always_deny": [
237 {
238 "pattern": "^Makefile$",
239 "case_sensitive": true
240 }
241 ]
242 }
243 }
244 }
245 }
246}
247```
248
249#### `copy_path` and `move_path` Patterns
250
251For the `copy_path` and `move_path` tools, patterns are matched independently against both the source and destination paths. A `deny` or `confirm` match on **either** path takes effect. For `always_allow`, **both** paths must match for auto-approval.
252
253#### MCP Tool Permissions
254
255MCP tools use the key format `mcp:<server_name>:<tool_name>` in the `tools` configuration. For example:
256
257```json [settings]
258{
259 "agent": {
260 "tool_permissions": {
261 "tools": {
262 "mcp:github:create_issue": {
263 "default": "confirm"
264 },
265 "mcp:github:create_pull_request": {
266 "default": "deny"
267 }
268 }
269 }
270 }
271}
272```
273
274The `default` key on each MCP tool entry is the primary mechanism for controlling MCP tool permissions. Pattern-based rules (`always_allow`, `always_deny`, `always_confirm`) match against an empty string for MCP tools, so most patterns won't match β use the tool-level `default` instead.
275
276See the [Tool Permissions](./tool-permissions.md) documentation for more examples and complete details.
277
278> **Note:** Before Zed v0.224.0, tool approval was controlled by the `agent.always_allow_tool_actions` boolean (default `false`). Set it to `true` to auto-approve tool actions, or leave it `false` to require confirmation for edits and tool calls.
279
280### Edit Display Mode
281
282Control whether to display review actions (accept & reject) in single buffers after the agent is done performing edits.
283The default value is `false`.
284
285```json [settings]
286{
287 "agent": {
288 "single_file_review": false
289 }
290}
291```
292
293### Sound Notification
294
295Control whether to hear a notification sound when the agent is done generating changes or needs your input. The default value is `never`.
296
297- `"never"` (default) β Never play the sound.
298- `"when_hidden"` β Only play the sound when the agent panel is not visible.
299- `"always"` β Always play the sound on completion.
300
301```json [settings]
302{
303 "agent": {
304 "play_sound_when_agent_done": "never"
305 }
306}
307```
308
309### Message Editor Size
310
311Use the `message_editor_min_lines` setting to control the minimum number of lines of height the agent message editor should have.
312It is set to `4` by default, and the max number of lines is always double of the minimum.
313
314```json [settings]
315{
316 "agent": {
317 "message_editor_min_lines": 4
318 }
319}
320```
321
322### Modifier to Send
323
324Require a modifier (`cmd` on macOS, `ctrl` on Linux) to send messages. Prevents accidental sends while editing.
325The default value is `false`.
326
327```json [settings]
328{
329 "agent": {
330 "use_modifier_to_send": true
331 }
332}
333```
334
335### Edit Card
336
337Use the `expand_edit_card` setting to control whether edit cards show the full diff in the Agent Panel.
338It is set to `true` by default, but if set to false, the card's height is capped to a certain number of lines, requiring a click to be expanded.
339
340```json [settings]
341{
342 "agent": {
343 "expand_edit_card": false
344 }
345}
346```
347
348### Terminal Card
349
350Use the `expand_terminal_card` setting to control whether terminal cards show the command output in the Agent Panel.
351It is set to `true` by default, but if set to false, the card will be fully collapsed even while the command is running, requiring a click to be expanded.
352
353```json [settings]
354{
355 "agent": {
356 "expand_terminal_card": false
357 }
358}
359```
360
361### Feedback Controls
362
363Control whether to display the thumbs up/down buttons at the bottom of each agent response, allowing you to give Zed feedback about the agent's performance.
364The default value is `true`.
365
366```json [settings]
367{
368 "agent": {
369 "enable_feedback": false
370 }
371}
372```