Repository navigation
Don't stop a session in bypass for routine work - #34
Merged
Merged
Conversation
Bypass didn't mean what it says: a plugin hook's ask still prompted, and enowX's own trim asked in a session switched to bypass after it started, as it went by how the session started rather than the mode the agent reports. The rewrite now goes by the mode. What still prompts is answered by one policy, through the agent's PermissionRequest hook, or by the screen for an agent without one: routine work passes, and what the urgent rules or a sure judge hold for the owner doesn't. A hook's deny never gets that far, and a session not in bypass asks as before. Each answer is in decide log. Checked on Claude Code 2.1.318 in a real terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
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.
A session in bypass could still stop and ask. This fixes enowX's own cause and adds one policy for what remains.
Inventory (Claude Code 2.1.318, run in a real terminal)
askdecide trimor a rewrite hookdaemon/hooks.go:186went by the start flagallowdenyPermissionRequestdoesn't firerm -rfwith a literal path,.git/,.claude/rmyou reportedrmusing a variable or wildcard wasn't tried, under your rule.rm -fcounts as irreversible anywherecore/goa/urgent.gorminside the project or scratchpad is routinecc-plugin-privacy: not installed here, so its own behaviour wasn't observed. A hook returningaskwas used in its place.The policy (
daemon/bypass.go)Applies only in bypass, by the mode the agent reports with each call, or how it started if it reports none. GOA's own session is excluded.
goa.Urgent(can't be undone, money, publishing, secrets), except a plainrminside the project or scratchpad; and what a sure judge doesn't allow.enowx-app decide log --use bypass, with what was asked, by what, and why."Who asked" is limited:
PermissionRequestdoesn't say which hook asked, so the log can only say the agent's prompt.The prompt can flash: Claude shows its dialog while the hook runs, so it may appear briefly, for as long as the judge takes.
What each agent gets
PermissionRequesthookTests
Scratchpad delete, plugin hook asking, hook denying, not-in-bypass still asking, urgent left to the owner, rewrite following the mode, GOA excluded,
removesOnlyInside. On enowxlabs: only these, then CI runs the package.Not run: the real app, Codex, screen answers on a real agent.
Touches no
go.mod,version/orcloud/, so merging doesn't deploy the cloud.🤖 Generated with Claude Code