Lockdown-denied bare commands should inject a .coily/coily.yaml hint #24

Open
opened 2026-05-27 22:19:00 +00:00 by coilysiren · 0 comments
Owner

Problem

Bare npm / npx / uv / python / python3 / cargo / dotnet / make invocations get denied by the per-repo Claude Code lockdown (the permissions.deny block written by coily lockdown). The deny message is the vanilla harness "Permission to use Bash with command X has been denied" - no routing text, no pointer at .coily/coily.yaml, no mention of the "add new verbs to that file before invoking them" rule.

Net effect: agent dead-ends on a deny that has a known recovery path (add the verb to .coily/coily.yaml and re-route through coily exec / coily make / equivalent).

Sister issue: coilysiren/agent-guard#23 (the wrapper-tier sweep). This issue is the second tier from that one's "Implementation sketch" - tracked separately so it can ship independently.

Ask

agent-guard's PreToolUse hook should catch these lockdown-shaped denies and inject a generic hint:

<cmd> is denied by the repo's .coily/coily.yaml lockdown. Add the verb to that file (see agentic-os-kai/AGENTS.md "Commands" section) or invoke an existing wrapper. Run coily --tree to enumerate available wrappers in this repo.

The hint does not need to know which specific verb to add - just pointing the agent at the config file plus coily --tree is enough to break the dead-end.

Detection

Probably easiest to enumerate the set of commonly-denied build/runtime tools (npm, npx, pnpm, yarn, bun, uv, python, python3, cargo, dotnet, make, just, task, go, rake, bundle, gem) and match against the bare-command head. Open question: whether to derive the list dynamically from the repo's own .coily/coily.yaml deny block, or hardcode the common set. Hardcode probably wins on simplicity since the list is short and stable.

Out of scope

The wrapper-tier coilyRoutes sweep (tracked in #23). This issue is specifically the generic "no wrapper exists, you need to edit the lockdown config" hint.

**Problem** Bare `npm` / `npx` / `uv` / `python` / `python3` / `cargo` / `dotnet` / `make` invocations get denied by the per-repo Claude Code lockdown (the `permissions.deny` block written by `coily lockdown`). The deny message is the vanilla harness "Permission to use Bash with command X has been denied" - no routing text, no pointer at `.coily/coily.yaml`, no mention of the "add new verbs to that file before invoking them" rule. Net effect: agent dead-ends on a deny that has a known recovery path (add the verb to `.coily/coily.yaml` and re-route through `coily exec` / `coily make` / equivalent). Sister issue: coilysiren/agent-guard#23 (the wrapper-tier sweep). This issue is the second tier from that one's "Implementation sketch" - tracked separately so it can ship independently. **Ask** agent-guard's PreToolUse hook should catch these lockdown-shaped denies and inject a generic hint: > `<cmd>` is denied by the repo's `.coily/coily.yaml` lockdown. Add the verb to that file (see `agentic-os-kai/AGENTS.md` "Commands" section) or invoke an existing wrapper. Run `coily --tree` to enumerate available wrappers in this repo. The hint does not need to know which specific verb to add - just pointing the agent at the config file plus `coily --tree` is enough to break the dead-end. **Detection** Probably easiest to enumerate the set of commonly-denied build/runtime tools (npm, npx, pnpm, yarn, bun, uv, python, python3, cargo, dotnet, make, just, task, go, rake, bundle, gem) and match against the bare-command head. Open question: whether to derive the list dynamically from the repo's own `.coily/coily.yaml` deny block, or hardcode the common set. Hardcode probably wins on simplicity since the list is short and stable. **Out of scope** The wrapper-tier `coilyRoutes` sweep (tracked in #23). This issue is specifically the generic "no wrapper exists, you need to edit the lockdown config" hint.
coilysiren added
P3
and removed
P2
labels 2026-05-31 07:01:25 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#24
No description provided.