Repository navigation
fix(zed): warn that a catch-all ask on edit/write does not prompt for in-project files - #3936
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the 2026-11-19 upstream re-check on #2415.
Zed's
edit_fileandwrite_filedo not prompt for files inside the project when the decision is aconfirmdefault. 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_editincrates/agent/src/tools/tool_permissions.rs@ v1.29.3 returnsOk(())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 makesalways_confirmpatterns prompt for in-project edits.So a canonical
edit: { "*": "ask" }/write: { "*": "ask" }, or an all-tools*ask those tools fall back to, becomesdefault: "confirm", and Zed lets the agent edit in-project files without asking. The docs saidask ⇄ confirmwith no caveat.Changes
zed-permissions.ts: at generate time, warn whenedit_file/write_fileend up with aconfirmdefault 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 regeneratedsrc/generated/docs-content.ts): document the in-project exemption and how to get a prompt (anaskpattern, which becomes analways_confirmentry and needs Zed v1.30+). Also note that analways_confirmmatch outranksalways_allowpatterns.*fallback, no warning with a".*"ask pattern).The generated settings do not change.
Not done here
always_confirm: [{ "pattern": ".*" }]automatically for a catch-allask. It is left out on purpose. In Zed,always_confirmoutranksalways_allow, so the extra entry would override the user's narrowerallowpatterns on the same tool. It also only works on v1.30, which is still a pre-release. Whether to do this is a maintainer decision..agents/skillsentries, projecting tool filters intoagent.profiles, the 50 KB total-skills budget, andprivate_filesaccumulating across scopes.Refs #2415
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4