Skip to content

fix(zed): warn that a catch-all ask on edit/write does not prompt for in-project files - #3936

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2415-zed-edit-confirm
Nov 22, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2415-zed-edit-confirm

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Follow-up to the 2026-11-19 upstream re-check on #2415.

Zed's edit_file and write_file do not prompt for files inside the project when the decision is a confirm default. Only Zed settings folders, .agents/skills/ and paths a symlink places outside the project still prompt. This is already the behavior of the current stable release: authorize_file_edit in crates/agent/src/tools/tool_permissions.rs @ v1.29.3 returns Ok(()) for a resolved in-project path that is not sensitive. zed-industries/zed#67037 (first shipped in v1.30.0-pre) documents it under "File Edits Inside the Project" and makes always_confirm patterns prompt for in-project edits.

So a canonical edit: { "*": "ask" } / write: { "*": "ask" }, or an all-tools * ask those tools fall back to, becomes default: "confirm", and Zed lets the agent edit in-project files without asking. The docs said ask ⇄ confirm with no caveat.

Changes

  • zed-permissions.ts: at generate time, warn when edit_file / write_file end up with a confirm default from the canonical config (their own catch-all, or the all-tools * fallback). The warning is skipped when the category already has a ".*" ask pattern.
  • docs/reference/file-formats.md (and the regenerated src/generated/docs-content.ts): document the in-project exemption and how to get a prompt (an ask pattern, which becomes an always_confirm entry and needs Zed v1.30+). Also note that an always_confirm match outranks always_allow patterns.
  • Tests for the warning (catch-all ask, * fallback, no warning with a ".*" ask pattern).

The generated settings do not change.

Not done here

Refs #2415

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 22, 2026 17:40
… in-project files

Zed's edit_file and write_file skip the permission prompt for files inside
the project when the decision is a `confirm` default; only Zed settings
folders, .agents/skills/ and paths outside the project still prompt. A
canonical catch-all `ask` on `edit`/`write`, or an all-tools `*` ask those
tools fall back to, therefore never asks for in-project edits. Warn at
generate time and document the exemption, pointing to an `ask` pattern
(always_confirm), which Zed honors for in-project edits from v1.30 on
(zed-industries/zed#67037).

Refs #2415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…larify .* caveats

- Skip the warning for a tool whose preserved, hand-written entry decides it.
- Document that only the literal ".*" ask pattern silences the warning.
- Note that ".*" means dotfiles in glob-matching targets (an extra ask only).
- Link the "File Edits Inside the Project" anchor in the Zed docs.
- Test that a tool-level allow over an all-tools ask does not warn.

Refs #2415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…d-edit-confirm

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit 6699563 into main Nov 22, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2415-zed-edit-confirm branch November 22, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant