PreToolUse hook should route bare mcporter to coily ops mcporter, not flat-deny #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
When an agent invokes bare
mcporter(e.g.mcporter list playwright,mcporter call playwright.browser_navigate ...), the Claude Code permission system returns a flatPermission to use Bash with command mcporter ... has been denied. No routing helper, no mention ofcoily ops mcporter.Expected
The PreToolUse hook should intercept the bare invocation and inject text steering the agent to the wrapper, the way
coilyRoutesdoes foraws/gh/kubectl/docker/tailscale/ssh/scp. The wrapper already exists (coily ops mcporter, "Pass-through to mcporter with argv validation + audit log").Repro
In a session under
~/projects/coilysiren/<repo>/, ask the agent to do anything that triggers the mcp-servers skill (e.g. checking GitHub Actions status, where coily explicitly hands off to Playwright per coily#305). The agent reaches formcporter call playwright.browser_navigate url=...and gets denied with no recovery hint. Net effect: the agent surfaces a blocker instead of completing the task, defeating the whole point of the lazy-MCP pattern intooling-mcp-servers.Fix sketch
Add
mcportertocoilyRoutesincmd/agent-guard/hook.go, with the routing message namingcoily ops mcporterand a one-line "usecoily ops mcporter call <server>.<tool> key=value" hint matching the wrapper's argv shape.