# Command Wrapper

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** timeout, nohup, xargs

## Think of it like

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

## 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

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

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

- **Fixed list.** timeout, nice, nohup.
- **Stripped first.** Then matched.
- **Runners are not.** npx, docker exec.

## Related terms

- [Bash Permission Rule](https://learn.benibix.com/term/ai/bash-permission-rule)
- [Compound Command](https://learn.benibix.com/term/ai/bash-compound-command)

---

Source: https://learn.benibix.com/term/ai/bash-command-wrapper
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
