You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real user reports: "I approve a shell command rooted at a parent directory, and the next invocation in a subdirectory re-prompts as if I never approved it." Repeatable in any session that runs find <dir>, ls <dir>, or similar across nested paths — every distinct path gets its own prompt and its own persisted entry.
Cause
PR #896 (cd69e4d2, directory-scoped shell command approval patterns) was merged into dev but has not been included in any released daemon binary. The current released daemon is 0.17.2 (commit 96ba080, 2026-05-06), which was cut before#896 landed.
The pre-#896 verb-chain extractor stores patterns shaped like find <first-positional-path> (verb plus non-flag tokens, no path normalization, no directory-root scoping). Two real consequences:
Sub-path re-prompts. Approve find ~/repo/foo. Next call is find ~/repo/foo/bar -type f → extracts a different verb chain (find ~/repo/foo/bar) → exact-match fails → re-prompt.
tool-approvals.json accumulates one entry per distinct path the user touches, even within a single trusted parent.
PR #896's ExtractApprovalEntries was specifically designed to fix this: it stores <absolute-root>/ (e.g., /home/user/repo/foo/) and matches subsequent invocations via IsWithinRoot. The fix is sitting on dev; users aren't getting it.
Won't be recognized as directory roots (no leading /, has a verb prefix).
Will continue to be matched as exact verb chains, which means the upgrade does not retroactively fix existing approvals — only NEW "Approve always" decisions will store directory roots.
The user has to re-approve once per parent directory to get the directory-root grandfathering behavior.
A one-shot migration that detects pre-feat: directory-scoped shell command approval patterns #896-style entries (entries containing ~/ or starting with a verb-and-space pattern) and surfaces them via netclaw doctor so users know they should re-approve.
Symptom
Real user reports: "I approve a shell command rooted at a parent directory, and the next invocation in a subdirectory re-prompts as if I never approved it." Repeatable in any session that runs
find <dir>,ls <dir>, or similar across nested paths — every distinct path gets its own prompt and its own persisted entry.Cause
PR #896 (
cd69e4d2, directory-scoped shell command approval patterns) was merged intodevbut has not been included in any released daemon binary. The current released daemon is0.17.2(commit96ba080,2026-05-06), which was cut before #896 landed.The pre-#896 verb-chain extractor stores patterns shaped like
find <first-positional-path>(verb plus non-flag tokens, no path normalization, no directory-root scoping). Two real consequences:find ~/repo/foo. Next call isfind ~/repo/foo/bar -type f→ extracts a different verb chain (find ~/repo/foo/bar) → exact-match fails → re-prompt.tool-approvals.jsonaccumulates one entry per distinct path the user touches, even within a single trusted parent.PR #896's
ExtractApprovalEntrieswas specifically designed to fix this: it stores<absolute-root>/(e.g.,/home/user/repo/foo/) and matches subsequent invocations viaIsWithinRoot. The fix is sitting ondev; users aren't getting it.What's pending in
devpast0.17.2Beyond #896,
devalso contains:That's a substantial backlog of fixes accumulating without a release vehicle.
Action
0.17.3fromdevASAP to ship feat: directory-scoped shell command approval patterns #896 + the other accumulated fixes. The pain reported here will keep recurring on every pre-feat: directory-scoped shell command approval patterns #896 daemon for as long as the release lag persists.tool-approvals.jsonentries shaped like the pre-feat: directory-scoped shell command approval patterns #896 verb-chain format (e.g.,find ~/repo/foo). After upgrading to a feat: directory-scoped shell command approval patterns #896-bearing daemon, those entries:/, has a verb prefix).0.17.3release notes explaining this. The newnetclaw approvalsCLI (PR feat: netclaw approvals CLI (list / revoke / TUI) (closes #921) #927) lets users inspect and clean up the stale verb-chain entries.Suggested follow-up (optional, not blocking)
~/or starting with a verb-and-space pattern) and surfaces them vianetclaw doctorso users know they should re-approve.netclaw approvals migratesubcommand that prompts the user to either keep or revoke each stale entry. Cheap to add given feat: netclaw approvals CLI (list / revoke / TUI) (closes #921) #927 already wires the CLI surface.Acceptance for THIS issue
0.17.3(or equivalent) release published with PR feat: directory-scoped shell command approval patterns #896 in it.tool-approvals.jsonfiles.Related
dev.netclaw approvalsCLI (gives users the tool to clean up stale entries after upgrade).FilePathApprovalMatcher.IsApprovedPOSIX comparer hazard (separate, but adjacent to the comparer-consolidation work in feat: netclaw approvals CLI (list / revoke / TUI) (closes #921) #927).