Skip to content

Don't stop a session in bypass for routine work - #34

Merged
enowdev merged 1 commit into
mainfrom
feat/bypass-policy
Nov 4, 2026
Merged

enowdev merged 1 commit into
mainfrom
feat/bypass-policy

Conversation

@enowdev

@enowdev enowdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner

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)

Way to a prompt Under bypass Cause Now
Another hook or plugin returns ask Prompts Claude honours it Answered by the policy
decide trim or a rewrite hook Prompts, if the session was switched to bypass after it started daemon/hooks.go:186 went by the start flag Fixed at source: goes by the reported mode
Rewrite with allow No prompt Unchanged
A hook's deny Refused; PermissionRequest doesn't fire Unchanged
rm -rf with a literal path, .git/, .claude/ No prompt seen Nothing to answer
The scratchpad rm you reported Not reproduced with literal paths. rm using a variable or wildcard wasn't tried, under your rule. Unknown Answered by the policy if it prompts
enowX's urgent rules as a blocker rm -f counts as irreversible anywhere core/goa/urgent.go A plain rm inside the project or scratchpad is routine

cc-plugin-privacy: not installed here, so its own behaviour wasn't observed. A hook returning ask was 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.

  • Stays with the owner: goa.Urgent (can't be undone, money, publishing, secrets), except a plain rm inside the project or scratchpad; and what a sure judge doesn't allow.
  • Allowed: the rest.
  • Logged either way: enowx-app decide log --use bypass, with what was asked, by what, and why.

"Who asked" is limited: PermissionRequest doesn'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

Agent Answered by Checked
Claude Code, Agent Teams PermissionRequest hook Run for real
Codex Same hook Not run: not installed here. Its answer format is from memory of its docs
Others, started in bypass The screen, where enowX knows the agent's keys Not run. A prompt it can't read stays the user's
Agent by hand in a shell tab Nothing new

Tests

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/ or cloud/, so merging doesn't deploy the cloud.

🤖 Generated with Claude Code

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>
@enowdev
enowdev merged commit 69333a1 into main Nov 4, 2026
3 of 4 checks passed
@enowdev

enowdev commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Its commits are in main through the 0.7.0 release merge (#40, e306b3b).

@enowdev
enowdev deleted the feat/bypass-policy branch November 5, 2026 04:58
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