Files
zed/crates/settings_content
Ben Brandt 12c1fc907f agent: Prompt for always_confirm patterns on in-project file edits (#67037)
`edit_file` and `write_file` skip the permission prompt for files inside
the project whenever the settings decision is `Confirm`. That is
intended for a `confirm` default, where in-project edits are reviewed
after the agent makes them. It also swallowed explicit `always_confirm`
patterns, which the docs say always prompt.

- `authorize_file_edit` now prompts when an `always_confirm` pattern
matches the path. It checks both the raw path and its normalized form,
so a `..` segment can't sidestep a pattern.
- A `confirm` default is unchanged: in-project edits still don't prompt.
- The docs, `default.json` and the `ToolPermissionMode::Confirm` doc
comment described `confirm` as "always prompt". They now describe what
the edit tools do with a `confirm` default and point to `always_confirm`
for prompting on specific files.

Related to #62276. This is an alternative to #66684, which would prompt
on every in-project edit under the default settings.

Release Notes:

- Fixed `always_confirm` patterns for the `edit_file` and `write_file`
agent tools not prompting for files inside the project.
2026-11-16 10:41:11 +00:00
..