Skip to content
BENIBIX Learn

Command Wrapper

AI⌨️ Claude CodeConfiguration

Also known as timeout, nohup, xargs

A small program that runs a command, and that rules look past.

Think of it like

It is like the box a gift comes in. The rule looks at the gift, not the box.

Example

Claude adds timeout 120 in front of a long test. Emma's rule for npm test still covers it, so she is not asked.

Why it matters

If it did not look past them, each wrapped command would need its own rule.

Definition

A command wrapper is a small program that runs another command, such as timeout, time, nice, nohup or plain xargs. Claude Code strips these before it checks a Bash rule. So Bash(npm test *) also covers timeout 30 npm test. The list is fixed. Runners like npx, devbox run and docker exec are not on it.

Example code

console
$ timeout 60 npm test
# checked as: npm test
$ docker exec app rm -rf /data
# checked as: docker exec app rm -rf /data
One wrapper is stripped, one is not.

Common mistake

Allowing all of devbox run. That covers what comes after run, rm -rf too.

Key takeaways

  1. 1
    Fixed list. timeout, nice, nohup.
  2. 2
    Stripped first. Then matched.
  3. 3
    Runners are not. npx, docker exec.