Session-scoped approval rules take effect
- Date: 2026-08-04
- Commit:
feat(permission): implement session-scoped permission rules and wire up the four approval semantics - Version cue:
0.12.1-alpha.2
Previously, the "allow / reject similar requests during this session" options in the approval panel were more of a hint — similar requests were not actually auto-approved or auto-denied. This change makes session-scoped permission rules actually take effect: when you choose "allow in session" or "reject in session", Hunea records the rule, and subsequent similar requests are auto-approved or auto-denied without prompting again.
What changed
-
All four approval semantics are now fully wired up
The four options in the approval panel now behave distinctly:Yes(this request only) — allows only the current request, writes no ruleYes, allow similar requests during this session— writes an allow rule; subsequent similar requests run automaticallyNo(this request only) — rejects only the current request, writes no ruleNo, reject similar requests during this session— writes a deny rule; subsequent similar requests are auto-denied
-
Rules match precisely by a safe scope
Different tools derive different matching scopes to avoid over-matching:- File tools (
write/edit): match by the target file path (workspace-relative, or the parent directory of an absolute path) bash: requires the command and working directory to match exactly- Other tools: match by exact structured arguments If a safe scope cannot be proven, no rule is written (fail-closed).
- File tools (
-
Deny-first evaluation
Multiple rules can coexist; when a request matches both an allow and a deny rule, deny always wins. -
Rule lifecycle
Rules are temporary, session-scoped:clear/newkeep the rules, and they are cleared after a successful session switch (resume) so they aren't carried over by mistake. -
Unified file-approval panel options
The four dynamic options for file approvals now share consistent markers and keyboard navigation.
Notes
- The full description of the four approval options is in Tools & Approval.
- It's worth reviewing the file diff preview before acting; for destructive operations such as deleting files,
git push --force, or changing permissions, it's better to keep per-request confirmation rather than allow them for the whole session.